From 16cab0fa348a45a77b14c53ad41b52305ea2db3a Mon Sep 17 00:00:00 2001 From: weisj Date: Wed, 18 Mar 2020 14:57:09 +0100 Subject: [PATCH] Fixed KEY_ALT_ARC and VARIANT_ONLY_LABEL not being applied to toggle buttons. --- .../weisj/darklaf/ui/button/DarkButtonUI.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java index 3290f554..54f7443b 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java +++ b/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));