Browse Source

Adjustments to toggle button selected color.

pull/105/head
weisj 5 years ago
parent
commit
2be132df0a
  1. 2
      core/src/main/java/com/github/weisj/darklaf/ui/button/DarkToggleButtonUI.java
  2. 3
      core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java
  3. 2
      core/src/main/resources/com/github/weisj/darklaf/properties/icons/presets/dark_icons.properties
  4. 2
      core/src/main/resources/com/github/weisj/darklaf/properties/ui/toggleButton.properties
  5. 37
      core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_icons.properties
  6. 37
      core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_icons.properties

2
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 {

3
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);

2
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

2
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

37
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
%errorIconColor = DC322F
%informationIconColor = 598bff
%warningIconColor = b58900
%questionIconColor = 598bff

37
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
%errorIconColor = DC322F
%informationIconColor = 268BD2
%warningIconColor = B58900
%questionIconColor = 268BD2

Loading…
Cancel
Save