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 61f285cc..5e0626b8 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 @@ -227,9 +227,9 @@ public class DarkButtonUI extends BasicButtonUI implements PropertyChangeListene protected Color getBackgroundColor(final JComponent c) { boolean defaultButton = isDefaultButton(c); - boolean rollOver = (c instanceof JButton && (((JButton) c).isRolloverEnabled() - && (((JButton) c).getModel().isRollover()))); - boolean clicked = c instanceof JButton && ((JButton) c).getModel().isArmed(); + boolean rollOver = c instanceof JButton && (((JButton) c).isRolloverEnabled() + && (((JButton) c).getModel().isRollover())); + boolean clicked = c instanceof JButton && (((JButton) c).getModel().isArmed()); if (c.isEnabled()) { if (defaultButton) { if (clicked) { diff --git a/core/src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties b/core/src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties index 1a0e388d..7d37438c 100644 --- a/core/src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties +++ b/core/src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties @@ -57,3 +57,5 @@ Button.fullShadowInsets = 0,0,0,0 Button.shadow.hover = %hoverHighlight Button.shadow.click = %clickHighlight + +defaultButtonFollowFocus = false