Browse Source

Merge branch 'master' into btn_bg

pull/44/head
Jannis Weis 5 years ago committed by GitHub
parent
commit
6d6f24bb41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java
  2. 2
      core/src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties

6
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) { protected Color getBackgroundColor(final JComponent c) {
boolean defaultButton = isDefaultButton(c); boolean defaultButton = isDefaultButton(c);
boolean rollOver = (c instanceof JButton && (((JButton) c).isRolloverEnabled() boolean rollOver = c instanceof JButton && (((JButton) c).isRolloverEnabled()
&& (((JButton) c).getModel().isRollover()))); && (((JButton) c).getModel().isRollover()));
boolean clicked = c instanceof JButton && ((JButton) c).getModel().isArmed(); boolean clicked = c instanceof JButton && (((JButton) c).getModel().isArmed());
if (c.isEnabled()) { if (c.isEnabled()) {
if (defaultButton) { if (defaultButton) {
if (clicked) { if (clicked) {

2
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.hover = %hoverHighlight
Button.shadow.click = %clickHighlight Button.shadow.click = %clickHighlight
defaultButtonFollowFocus = false

Loading…
Cancel
Save