Browse Source

Fixed KEY_ALT_ARC and VARIANT_ONLY_LABEL not being applied to toggle buttons.

pull/97/head
weisj 5 years ago
parent
commit
16cab0fa34
  1. 20
      core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java

20
core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java

@ -90,16 +90,6 @@ public class DarkButtonUI extends BasicButtonUI implements PropertyChangeListene
return new DarkButtonUI();
}
public static boolean chooseAlternativeArc(final Component c) {
return c instanceof JButton
&& Boolean.TRUE.equals(((JButton) c).getClientProperty(KEY_ALT_ARC));
}
public static boolean isLabelButton(final Component c) {
return c instanceof JButton
&& VARIANT_ONLY_LABEL.equals(((JButton) c).getClientProperty(KEY_VARIANT));
}
@Override
protected void installListeners(final AbstractButton b) {
super.installListeners(b);
@ -161,6 +151,16 @@ public class DarkButtonUI extends BasicButtonUI implements PropertyChangeListene
return fg;
}
public static boolean chooseAlternativeArc(final Component c) {
return c instanceof AbstractButton
&& Boolean.TRUE.equals(((AbstractButton) c).getClientProperty(KEY_ALT_ARC));
}
public static boolean isLabelButton(final Component c) {
return c instanceof AbstractButton
&& VARIANT_ONLY_LABEL.equals(((AbstractButton) c).getClientProperty(KEY_VARIANT));
}
public static boolean isNoArc(final Component c) {
return c instanceof AbstractButton
&& Boolean.TRUE.equals(((AbstractButton) c).getClientProperty(KEY_NO_ARC));

Loading…
Cancel
Save