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 c3553e12..d872eac4 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 @@ -338,8 +338,7 @@ public class DarkButtonUI extends BasicButtonUI implements ButtonConstants { protected Color getBackgroundColor(final JComponent c) { boolean defaultButton = ButtonConstants.isDefaultButton(c); AbstractButton b = (AbstractButton) c; - boolean rollOver = (b.isRolloverEnabled() || ButtonConstants.doConvertToBorderless(b)) - && (((JButton) c).getModel().isRollover()); + boolean rollOver = b.isRolloverEnabled() && b.getModel().isRollover(); boolean clicked = b.getModel().isArmed(); if (c.isEnabled()) { if (defaultButton) { diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java index f0136f30..cdccbf1c 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java @@ -189,6 +189,7 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge { comboBox.setEnabled(comboBox.getItemCount() > 1); } }); + comboBox.putClientProperty("JComboBox.isTableCellEditor", true); comboBox.putClientProperty(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY, filesOfTypeLabelText); comboBox.setRenderer(createFilterComboBoxRenderer()); return comboBox; @@ -219,6 +220,7 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge { return d; } }; + comboBox.putClientProperty("JComboBox.isTableCellEditor", true); comboBox.putClientProperty(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY, lookInLabelText); comboBox.addActionListener(directoryComboBoxAction); comboBox.setRenderer(createDirectoryComboBoxRenderer(fileChooser)); @@ -318,7 +320,7 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge { button.putClientProperty(DarkButtonUI.KEY_NO_BORDERLESS_OVERWRITE, true); button.putClientProperty(DarkButtonUI.KEY_SQUARE, true); button.putClientProperty(DarkButtonUI.KEY_ALT_ARC, true); - button.putClientProperty(DarkButtonUI.KEY_SQUARE, Boolean.TRUE); + button.putClientProperty(DarkButtonUI.KEY_SQUARE, true); button.setAlignmentX(JComponent.LEFT_ALIGNMENT); button.setAlignmentY(JComponent.CENTER_ALIGNMENT); button.setToolTipText(tipText); diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/DarkToggleButtonUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/DarkToggleButtonUI.java index 704cb8ef..badade3d 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/DarkToggleButtonUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/DarkToggleButtonUI.java @@ -23,7 +23,6 @@ */ package com.github.weisj.darklaf.ui.togglebutton; -import com.github.weisj.darklaf.ui.button.ButtonConstants; import com.github.weisj.darklaf.ui.button.DarkButtonUI; import com.github.weisj.darklaf.util.DarkUIUtil; import com.github.weisj.darklaf.util.GraphicsContext; @@ -140,10 +139,9 @@ public class DarkToggleButtonUI extends DarkButtonUI implements ToggleButtonCons protected Color getBackgroundColor(final JComponent c) { AbstractButton b = (AbstractButton) c; - boolean rollOver = (b.isRolloverEnabled() || ButtonConstants.doConvertToBorderless(b)) - && (((JButton) c).getModel().isRollover()); + boolean rollOver = b.isRolloverEnabled() && b.getModel().isRollover(); boolean clicked = b.getModel().isArmed(); - boolean isSelected = c instanceof JToggleButton && ((JToggleButton) c).isSelected(); + boolean isSelected = b.isSelected(); if (c.isEnabled()) { if (isSelected) return background; 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 57484c67..452b1bc1 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 @@ -60,5 +60,6 @@ Button.borderless.outline.hover = %hoverHighlightOutline Button.borderless.outline.click = %clickHighlightOutline Button.borderless.drawOutline = false +Button.rollover = false Button.defaultButtonFollowsFocus = false Button.convertIconOnlyToBorderless = true