Browse Source

Use correct foreground color when selected togglebutton is disabled. Fixes #191

pull/187/head
weisj 4 years ago
parent
commit
6d4c3bc6df
  1. 5
      core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/DarkToggleButtonUI.java

5
core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/DarkToggleButtonUI.java

@ -133,9 +133,10 @@ public class DarkToggleButtonUI extends DarkButtonUI implements ToggleButtonCons
@Override
protected Color getForeground(final AbstractButton button) {
if (button.isSelected()
&& button.isEnabled()
&& button.getForeground() instanceof UIResource
&& !ToggleButtonConstants.isSlider(button)
&& !ButtonConstants.isBorderlessVariant(button)
&& button.getForeground() instanceof UIResource) {
&& !ButtonConstants.isBorderlessVariant(button)) {
return selectedForeground;
}
return super.getForeground(button);

Loading…
Cancel
Save