diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java index 528d6475..17c07ce3 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatComboBoxUI.java @@ -61,6 +61,7 @@ import com.formdev.flatlaf.util.UIScale; * @uiDefault ComboBox.buttonEditableBackground Color * @uiDefault ComboBox.buttonArrowColor Color * @uiDefault ComboBox.buttonDisabledArrowColor Color + * @uiDefault ComboBox.buttonHoverArrowColor Color * * @author Karl Tauber */ @@ -79,6 +80,7 @@ public class FlatComboBoxUI protected Color buttonEditableBackground; protected Color buttonArrowColor; protected Color buttonDisabledArrowColor; + protected Color buttonHoverArrowColor; public static ComponentUI createUI( JComponent c ) { return new FlatComboBoxUI(); @@ -100,6 +102,7 @@ public class FlatComboBoxUI buttonEditableBackground = UIManager.getColor( "ComboBox.buttonEditableBackground" ); buttonArrowColor = UIManager.getColor( "ComboBox.buttonArrowColor" ); buttonDisabledArrowColor = UIManager.getColor( "ComboBox.buttonDisabledArrowColor" ); + buttonHoverArrowColor = UIManager.getColor( "ComboBox.buttonHoverArrowColor" ); // scale padding = UIScale.scale( padding ); @@ -119,6 +122,7 @@ public class FlatComboBoxUI buttonEditableBackground = null; buttonArrowColor = null; buttonDisabledArrowColor = null; + buttonHoverArrowColor = null; } @Override @@ -212,7 +216,8 @@ public class FlatComboBoxUI @Override protected JButton createArrowButton() { - return new FlatArrowButton( SwingConstants.SOUTH, buttonArrowColor, buttonDisabledArrowColor, null, null ); + return new FlatArrowButton( SwingConstants.SOUTH, buttonArrowColor, + buttonDisabledArrowColor, buttonHoverArrowColor, null ); } @Override diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java index b2615925..f6fe7404 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java @@ -55,6 +55,7 @@ import javax.swing.plaf.basic.BasicSpinnerUI; * @uiDefault Spinner.buttonBackground Color * @uiDefault Spinner.buttonArrowColor Color * @uiDefault Spinner.buttonDisabledArrowColor Color + * @uiDefault Spinner.buttonHoverArrowColor Color * @uiDefault Spinner.padding Insets * * @author Karl Tauber @@ -74,6 +75,7 @@ public class FlatSpinnerUI protected Color buttonBackground; protected Color buttonArrowColor; protected Color buttonDisabledArrowColor; + protected Color buttonHoverArrowColor; protected Insets padding; public static ComponentUI createUI( JComponent c ) { @@ -94,6 +96,7 @@ public class FlatSpinnerUI buttonBackground = UIManager.getColor( "Spinner.buttonBackground" ); buttonArrowColor = UIManager.getColor( "Spinner.buttonArrowColor" ); buttonDisabledArrowColor = UIManager.getColor( "Spinner.buttonDisabledArrowColor" ); + buttonHoverArrowColor = UIManager.getColor( "Spinner.buttonHoverArrowColor" ); padding = UIManager.getInsets( "Spinner.padding" ); // scale @@ -111,6 +114,7 @@ public class FlatSpinnerUI buttonBackground = null; buttonArrowColor = null; buttonDisabledArrowColor = null; + buttonHoverArrowColor = null; padding = null; } @@ -201,7 +205,8 @@ public class FlatSpinnerUI } private Component createArrowButton( int direction, String name ) { - FlatArrowButton button = new FlatArrowButton( direction, buttonArrowColor, buttonDisabledArrowColor, null, null ); + FlatArrowButton button = new FlatArrowButton( direction, buttonArrowColor, + buttonDisabledArrowColor, buttonHoverArrowColor, null ); button.setName( name ); button.setYOffset( (direction == SwingConstants.NORTH) ? 1 : -1 ); if( direction == SwingConstants.NORTH ) diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index 5605bd88..cb14f212 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -97,6 +97,7 @@ ComboBox.buttonBackground=@textComponentBackground ComboBox.buttonEditableBackground=404445 ComboBox.buttonArrowColor=9A9DA1 ComboBox.buttonDisabledArrowColor=585858 +ComboBox.buttonHoverArrowColor=bbbbbb #---- Component ---- diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties index dc60067b..64cda371 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -275,6 +275,7 @@ Spinner.background=@textComponentBackground Spinner.buttonBackground=@@ComboBox.buttonEditableBackground Spinner.buttonArrowColor=@@ComboBox.buttonArrowColor Spinner.buttonDisabledArrowColor=@@ComboBox.buttonDisabledArrowColor +Spinner.buttonHoverArrowColor=@@ComboBox.buttonHoverArrowColor Spinner.padding=@textComponentMargin diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index f822071e..4e93dadb 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -97,6 +97,7 @@ ComboBox.buttonBackground=@textComponentBackground ComboBox.buttonEditableBackground=fafafa ComboBox.buttonArrowColor=666666 ComboBox.buttonDisabledArrowColor=ABABAB +ComboBox.buttonHoverArrowColor=999999 #---- Component ---- diff --git a/flatlaf-core/src/test/resources/com/formdev/flatlaf/FlatTestLaf.properties b/flatlaf-core/src/test/resources/com/formdev/flatlaf/FlatTestLaf.properties index e8d07cd5..591f0425 100644 --- a/flatlaf-core/src/test/resources/com/formdev/flatlaf/FlatTestLaf.properties +++ b/flatlaf-core/src/test/resources/com/formdev/flatlaf/FlatTestLaf.properties @@ -81,6 +81,7 @@ ComboBox.buttonBackground=f0f0f0 ComboBox.buttonEditableBackground=cccccc ComboBox.buttonArrowColor=666666 ComboBox.buttonDisabledArrowColor=ABABAB +ComboBox.buttonHoverArrowColor=ff0000 #---- Component ----