From 2be132df0a724b133a05d470330362c284d9b9a3 Mon Sep 17 00:00:00 2001 From: weisj Date: Thu, 19 Mar 2020 13:21:05 +0100 Subject: [PATCH] Adjustments to toggle button selected color. --- .../darklaf/ui/button/DarkToggleButtonUI.java | 2 +- .../ui/filechooser/DarkFileChooserUI.java | 3 +- .../icons/presets/dark_icons.properties | 2 +- .../properties/ui/toggleButton.properties | 2 +- .../solarized_dark_icons.properties | 37 ++++++++++--------- .../solarized_light_icons.properties | 37 ++++++++++--------- 6 files changed, 42 insertions(+), 41 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/button/DarkToggleButtonUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/button/DarkToggleButtonUI.java index 6d997137..1bd80fdd 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/button/DarkToggleButtonUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/button/DarkToggleButtonUI.java @@ -121,7 +121,7 @@ public class DarkToggleButtonUI extends DarkButtonUI { boolean clicked = b.getModel().isArmed(); if (c.isEnabled()) { if (clicked) { - return background; + return clickBackground; } else if (rollOver) { return hoverBackground; } else { diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java index bb6d40e4..f30155fe 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java @@ -145,6 +145,7 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge { b = new TooltipAwareButton(filePane.getNewFolderAction()); b.putClientProperty(DarkButtonUI.KEY_NO_SHADOW_OVERWRITE, true); b.setText(null); + b.setFocusPainted(false); b.putClientProperty(DarkButtonUI.KEY_SQUARE, true); b.putClientProperty(DarkButtonUI.KEY_ALT_ARC, true); b.setIcon(newFolderIcon); @@ -165,7 +166,6 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge { listViewButton = new TooltipAwareToggleButton(listViewIcon); Icon selectedListViewIcon = UIManager.getIcon("FileChooser.listViewSelectedIcon"); listViewButton.setSelectedIcon(selectedListViewIcon); - listViewButton.setPressedIcon(selectedListViewIcon); listViewButton.setFocusPainted(false); listViewButton.putClientProperty(DarkButtonUI.KEY_NO_SHADOW_OVERWRITE, true); listViewButton.putClientProperty(DarkButtonUI.KEY_SQUARE, true); @@ -187,7 +187,6 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge { detailsViewButton = new TooltipAwareToggleButton(detailsViewIcon); Icon selectedDetailsViewIcon = UIManager.getIcon("FileChooser.detailsViewSelectedIcon"); detailsViewButton.setSelectedIcon(selectedDetailsViewIcon); - detailsViewButton.setPressedIcon(selectedDetailsViewIcon); detailsViewButton.setFocusPainted(false); detailsViewButton.putClientProperty(DarkButtonUI.KEY_NO_SHADOW_OVERWRITE, true); detailsViewButton.putClientProperty(DarkButtonUI.KEY_SQUARE, true); diff --git a/core/src/main/resources/com/github/weisj/darklaf/properties/icons/presets/dark_icons.properties b/core/src/main/resources/com/github/weisj/darklaf/properties/icons/presets/dark_icons.properties index 16992901..ec514308 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/properties/icons/presets/dark_icons.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/properties/icons/presets/dark_icons.properties @@ -25,7 +25,7 @@ %menuIconEnabled = AFB1B3 %menuIconHovered = dddddd %menuIconSelected = AFB1B3 -%menuIconSelectedSecondary = AFB1B3 +%menuIconSelectedSecondary = 333333 %menuIconDisabled = 6E6E6E %menuIconHighlight = 40B6E0 diff --git a/core/src/main/resources/com/github/weisj/darklaf/properties/ui/toggleButton.properties b/core/src/main/resources/com/github/weisj/darklaf/properties/ui/toggleButton.properties index 6a3080c2..5c7ac71b 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/properties/ui/toggleButton.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/properties/ui/toggleButton.properties @@ -33,6 +33,6 @@ ToggleButton.disabledSliderKnobFillColor = %controlFillDisabled ToggleButton.disabledSliderKnobBorderColor = %controlFillDisabled ToggleButton.inactiveFillColor = %widgetFill -ToggleButton.activeFillColor = %backgroundSelectedSecondary +ToggleButton.activeFillColor = %textForegroundInactive ToggleButton.sliderSize = 35,17 diff --git a/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_icons.properties b/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_icons.properties index 92aa1286..1727314d 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_icons.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_icons.properties @@ -22,25 +22,26 @@ # SOFTWARE. # # suppress inspection "UnusedProperty" for whole file -%menuIconEnabled = 93A1A1 -%menuIconHovered = E9FFFF -%menuIconSelected = 93A1A1 -%menuIconDisabled = 5A5A5A -%menuIconHighlight = 1D6B9C +%menuIconEnabled = 93A1A1 +%menuIconHovered = E9FFFF +%menuIconSelected = 93A1A1 +%menuIconSelectedSecondary = 3F3F3F +%menuIconDisabled = 5A5A5A +%menuIconHighlight = 1D6B9C -%fileIconBackground = 798D90 -%fileIconForeground = 002B36 -%fileIconHighlight = 859900 +%fileIconBackground = 798D90 +%fileIconForeground = 002B36 +%fileIconHighlight = 859900 -%textIconEnabled = FFFFFF -%textIconDisabled = 000000 -%textIconSelected = FFFFFF +%textIconEnabled = FFFFFF +%textIconDisabled = 000000 +%textIconSelected = FFFFFF -%windowButton = A9A9A9 -%windowButtonDisabled = 8C8C8C -%windowCloseHovered = FFFFFF +%windowButton = A9A9A9 +%windowButtonDisabled = 8C8C8C +%windowCloseHovered = FFFFFF -%errorIconColor = DC322F -%informationIconColor = 598bff -%warningIconColor = b58900 -%questionIconColor = 598bff \ No newline at end of file +%errorIconColor = DC322F +%informationIconColor = 598bff +%warningIconColor = b58900 +%questionIconColor = 598bff diff --git a/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_icons.properties b/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_icons.properties index 4470e8f7..f96fcc4b 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_icons.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_icons.properties @@ -22,25 +22,26 @@ # SOFTWARE. # # suppress inspection "UnusedProperty" for whole file -%menuIconEnabled = 586E75 -%menuIconHovered = BDECFB -%menuIconSelected = FFFFFF -%menuIconDisabled = BCBCBC -%menuIconHighlight = 268BD2 +%menuIconEnabled = 586E75 +%menuIconHovered = BDECFB +%menuIconSelected = FFFFFF +%menuIconSelectedSecondary = EEEEEE +%menuIconDisabled = BCBCBC +%menuIconHighlight = 268BD2 -%fileIconBackground = 849396 -%fileIconForeground = 002B36 -%fileIconHighlight = 859900 +%fileIconBackground = 849396 +%fileIconForeground = 002B36 +%fileIconHighlight = 859900 -%textIconEnabled = 3E3E3C -%textIconDisabled = B8BABA -%textIconSelected = FFFFFF +%textIconEnabled = 3E3E3C +%textIconDisabled = B8BABA +%textIconSelected = FFFFFF -%windowButton = 050708 -%windowButtonDisabled = 9B9C9C -%windowCloseHovered = FFFFFF +%windowButton = 050708 +%windowButtonDisabled = 9B9C9C +%windowCloseHovered = FFFFFF -%errorIconColor = DC322F -%informationIconColor = 268BD2 -%warningIconColor = B58900 -%questionIconColor = 268BD2 \ No newline at end of file +%errorIconColor = DC322F +%informationIconColor = 268BD2 +%warningIconColor = B58900 +%questionIconColor = 268BD2