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. 1
      core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_icons.properties
  6. 1
      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(); boolean clicked = b.getModel().isArmed();
if (c.isEnabled()) { if (c.isEnabled()) {
if (clicked) { if (clicked) {
return background; return clickBackground;
} else if (rollOver) { } else if (rollOver) {
return hoverBackground; return hoverBackground;
} else { } 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 = new TooltipAwareButton(filePane.getNewFolderAction());
b.putClientProperty(DarkButtonUI.KEY_NO_SHADOW_OVERWRITE, true); b.putClientProperty(DarkButtonUI.KEY_NO_SHADOW_OVERWRITE, true);
b.setText(null); b.setText(null);
b.setFocusPainted(false);
b.putClientProperty(DarkButtonUI.KEY_SQUARE, true); b.putClientProperty(DarkButtonUI.KEY_SQUARE, true);
b.putClientProperty(DarkButtonUI.KEY_ALT_ARC, true); b.putClientProperty(DarkButtonUI.KEY_ALT_ARC, true);
b.setIcon(newFolderIcon); b.setIcon(newFolderIcon);
@ -165,7 +166,6 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge {
listViewButton = new TooltipAwareToggleButton(listViewIcon); listViewButton = new TooltipAwareToggleButton(listViewIcon);
Icon selectedListViewIcon = UIManager.getIcon("FileChooser.listViewSelectedIcon"); Icon selectedListViewIcon = UIManager.getIcon("FileChooser.listViewSelectedIcon");
listViewButton.setSelectedIcon(selectedListViewIcon); listViewButton.setSelectedIcon(selectedListViewIcon);
listViewButton.setPressedIcon(selectedListViewIcon);
listViewButton.setFocusPainted(false); listViewButton.setFocusPainted(false);
listViewButton.putClientProperty(DarkButtonUI.KEY_NO_SHADOW_OVERWRITE, true); listViewButton.putClientProperty(DarkButtonUI.KEY_NO_SHADOW_OVERWRITE, true);
listViewButton.putClientProperty(DarkButtonUI.KEY_SQUARE, true); listViewButton.putClientProperty(DarkButtonUI.KEY_SQUARE, true);
@ -187,7 +187,6 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge {
detailsViewButton = new TooltipAwareToggleButton(detailsViewIcon); detailsViewButton = new TooltipAwareToggleButton(detailsViewIcon);
Icon selectedDetailsViewIcon = UIManager.getIcon("FileChooser.detailsViewSelectedIcon"); Icon selectedDetailsViewIcon = UIManager.getIcon("FileChooser.detailsViewSelectedIcon");
detailsViewButton.setSelectedIcon(selectedDetailsViewIcon); detailsViewButton.setSelectedIcon(selectedDetailsViewIcon);
detailsViewButton.setPressedIcon(selectedDetailsViewIcon);
detailsViewButton.setFocusPainted(false); detailsViewButton.setFocusPainted(false);
detailsViewButton.putClientProperty(DarkButtonUI.KEY_NO_SHADOW_OVERWRITE, true); detailsViewButton.putClientProperty(DarkButtonUI.KEY_NO_SHADOW_OVERWRITE, true);
detailsViewButton.putClientProperty(DarkButtonUI.KEY_SQUARE, 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 %menuIconEnabled = AFB1B3
%menuIconHovered = dddddd %menuIconHovered = dddddd
%menuIconSelected = AFB1B3 %menuIconSelected = AFB1B3
%menuIconSelectedSecondary = AFB1B3 %menuIconSelectedSecondary = 333333
%menuIconDisabled = 6E6E6E %menuIconDisabled = 6E6E6E
%menuIconHighlight = 40B6E0 %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.disabledSliderKnobBorderColor = %controlFillDisabled
ToggleButton.inactiveFillColor = %widgetFill ToggleButton.inactiveFillColor = %widgetFill
ToggleButton.activeFillColor = %backgroundSelectedSecondary ToggleButton.activeFillColor = %textForegroundInactive
ToggleButton.sliderSize = 35,17 ToggleButton.sliderSize = 35,17

1
core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_icons.properties

@ -25,6 +25,7 @@
%menuIconEnabled = 93A1A1 %menuIconEnabled = 93A1A1
%menuIconHovered = E9FFFF %menuIconHovered = E9FFFF
%menuIconSelected = 93A1A1 %menuIconSelected = 93A1A1
%menuIconSelectedSecondary = 3F3F3F
%menuIconDisabled = 5A5A5A %menuIconDisabled = 5A5A5A
%menuIconHighlight = 1D6B9C %menuIconHighlight = 1D6B9C

1
core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_icons.properties

@ -25,6 +25,7 @@
%menuIconEnabled = 586E75 %menuIconEnabled = 586E75
%menuIconHovered = BDECFB %menuIconHovered = BDECFB
%menuIconSelected = FFFFFF %menuIconSelected = FFFFFF
%menuIconSelectedSecondary = EEEEEE
%menuIconDisabled = BCBCBC %menuIconDisabled = BCBCBC
%menuIconHighlight = 268BD2 %menuIconHighlight = 268BD2

Loading…
Cancel
Save