diff --git a/CHANGELOG.md b/CHANGELOG.md index 19113ed2..95936411 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ FlatLaf Change Log ## Unreleased +- ToolTip: Improved styling of dark tooltips (darker background, no border). +- ToolTip: Fixed colors in tooltips of disabled components. (issue #15) - ComboBox: Fixed NPE in combobox with custom renderer after switching to FlatLaf. (issue #16; regression in 0.14) diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index b3877358..4b31f608 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -227,7 +227,8 @@ ToggleButton.toolbar.selectedBackground=5c6164 #---- ToolTip ---- -ToolTip.background=4b4d4d +ToolTip.border=4,6,4,6 +ToolTip.background=1e2123 #---- Tree ---- diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties index 538ec09c..4b78a6c7 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -409,7 +409,9 @@ ToolBar.separatorColor=@@Separator.foreground #---- ToolTip ---- -ToolTip.border=2,6,2,6,@@Component.borderColor +ToolTip.borderInactive=null +ToolTip.backgroundInactive=@@ToolTip.background +ToolTip.foregroundInactive=@disabledText #---- Tree ---- diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index c7cdde4a..e2629471 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -234,7 +234,8 @@ ToggleButton.toolbar.selectedBackground=cfcfcf #---- ToolTip ---- -ToolTip.background=f7f7f7 +ToolTip.border=4,6,4,6,@@Component.borderColor +ToolTip.background=fafafa #---- Tree ---- diff --git a/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.java b/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.java index c937e7e2..9f6bdaed 100644 --- a/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.java +++ b/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.java @@ -230,12 +230,14 @@ public class FlatComponentsTest //---- button1 ---- button1.setText("enabled"); button1.setDisplayedMnemonicIndex(0); + button1.setToolTipText("This button is enabled."); add(button1, "cell 1 1"); //---- button2 ---- button2.setText("disabled"); button2.setDisplayedMnemonicIndex(0); button2.setEnabled(false); + button2.setToolTipText("This button is disabled."); add(button2, "cell 2 1"); //---- button5 ---- diff --git a/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.jfd b/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.jfd index 852e61ae..6803cc65 100644 --- a/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.jfd +++ b/flatlaf-core/src/test/java/com/formdev/flatlaf/FlatComponentsTest.jfd @@ -43,6 +43,7 @@ new FormModel { name: "button1" "text": "enabled" "displayedMnemonicIndex": 0 + "toolTipText": "This button is enabled." }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 1 1" } ) @@ -51,6 +52,7 @@ new FormModel { "text": "disabled" "displayedMnemonicIndex": 0 "enabled": false + "toolTipText": "This button is disabled." }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) { "value": "cell 2 1" } )