diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fa30e24..923fed3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ FlatLaf Change Log ================== +## 0.47-SNAPSHOT + +#### New features and improvements + +- ComboBox, Spinner and SplitPaneDivider: Added pressed feedback to arrow + buttons. + + ## 0.46 #### New features and improvements diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java index e5319a6d..795b220d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatArrowButton.java @@ -57,18 +57,6 @@ public class FlatArrowButton private boolean hover; private boolean pressed; - public FlatArrowButton( int direction, String type, Color foreground, Color disabledForeground, - Color hoverForeground, Color hoverBackground ) - { - this( direction, type, foreground, disabledForeground, hoverForeground, hoverBackground, null ); - } - - public FlatArrowButton( int direction, String type, Color foreground, Color disabledForeground, - Color hoverForeground, Color hoverBackground, Color pressedBackground ) - { - this( direction, type, foreground, disabledForeground, hoverForeground, hoverBackground, null, pressedBackground ); - } - public FlatArrowButton( int direction, String type, Color foreground, Color disabledForeground, Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground ) { @@ -85,7 +73,9 @@ public class FlatArrowButton setOpaque( false ); setBorder( null ); - if( hoverForeground != null || hoverBackground != null || pressedBackground != null ) { + if( hoverForeground != null || hoverBackground != null || + pressedForeground != null || pressedBackground != null ) + { addMouseListener( new MouseAdapter() { @Override public void mouseEntered( MouseEvent e ) { @@ -151,7 +141,7 @@ public class FlatArrowButton } protected Color deriveForeground( Color foreground ) { - return foreground; + return FlatUIUtils.deriveColor( foreground, this.foreground ); } @Override 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 82bc86bb..273b6be9 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 @@ -34,6 +34,8 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.geom.Rectangle2D; import java.beans.PropertyChangeEvent; @@ -97,6 +99,7 @@ import com.formdev.flatlaf.util.UIScale; * @uiDefault ComboBox.buttonArrowColor Color * @uiDefault ComboBox.buttonDisabledArrowColor Color * @uiDefault ComboBox.buttonHoverArrowColor Color + * @uiDefault ComboBox.buttonPressedArrowColor Color * * @author Karl Tauber */ @@ -120,9 +123,11 @@ public class FlatComboBoxUI protected Color buttonArrowColor; protected Color buttonDisabledArrowColor; protected Color buttonHoverArrowColor; + protected Color buttonPressedArrowColor; private MouseListener hoverListener; protected boolean hover; + protected boolean pressed; private WeakReference lastRendererComponent; @@ -134,13 +139,36 @@ public class FlatComboBoxUI protected void installListeners() { super.installListeners(); - hoverListener = new FlatUIUtils.HoverListener( null, h -> { - if( !comboBox.isEditable() ) { - hover = h; - if( arrowButton != null ) + hoverListener = new MouseAdapter() { + @Override + public void mouseEntered( MouseEvent e ) { + hover = true; + repaintArrowButton(); + } + + @Override + public void mouseExited( MouseEvent e ) { + hover = false; + repaintArrowButton(); + } + + @Override + public void mousePressed( MouseEvent e ) { + pressed = true; + repaintArrowButton(); + } + + @Override + public void mouseReleased( MouseEvent e ) { + pressed = false; + repaintArrowButton(); + } + + private void repaintArrowButton() { + if( arrowButton != null && !comboBox.isEditable() ) arrowButton.repaint(); } - } ); + }; comboBox.addMouseListener( hoverListener ); } @@ -175,6 +203,7 @@ public class FlatComboBoxUI buttonArrowColor = UIManager.getColor( "ComboBox.buttonArrowColor" ); buttonDisabledArrowColor = UIManager.getColor( "ComboBox.buttonDisabledArrowColor" ); buttonHoverArrowColor = UIManager.getColor( "ComboBox.buttonHoverArrowColor" ); + buttonPressedArrowColor = UIManager.getColor( "ComboBox.buttonPressedArrowColor" ); // set maximumRowCount int maximumRowCount = UIManager.getInt( "ComboBox.maximumRowCount" ); @@ -203,6 +232,7 @@ public class FlatComboBoxUI buttonArrowColor = null; buttonDisabledArrowColor = null; buttonHoverArrowColor = null; + buttonPressedArrowColor = null; MigLayoutVisualPadding.uninstall( comboBox ); } @@ -516,19 +546,26 @@ public class FlatComboBoxUI extends FlatArrowButton { protected FlatComboBoxButton() { - this( SwingConstants.SOUTH, arrowType, buttonArrowColor, buttonDisabledArrowColor, buttonHoverArrowColor, null, null ); + this( SwingConstants.SOUTH, arrowType, buttonArrowColor, buttonDisabledArrowColor, + buttonHoverArrowColor, null, buttonPressedArrowColor, null ); } protected FlatComboBoxButton( int direction, String type, Color foreground, Color disabledForeground, - Color hoverForeground, Color hoverBackground, Color pressedBackground ) + Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground ) { - super( direction, type, foreground, disabledForeground, hoverForeground, hoverBackground, pressedBackground ); + super( direction, type, foreground, disabledForeground, + hoverForeground, hoverBackground, pressedForeground, pressedBackground ); } @Override protected boolean isHover() { return super.isHover() || (!comboBox.isEditable() ? hover : false); } + + @Override + protected boolean isPressed() { + return super.isPressed() || (!comboBox.isEditable() ? pressed : false); + } } //---- class FlatComboPopup ----------------------------------------------- diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java index dfe86e99..a589f705 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java @@ -357,13 +357,14 @@ public class FlatScrollBarUI { protected FlatScrollBarButton( int direction ) { this( direction, arrowType, buttonArrowColor, buttonDisabledArrowColor, - null, hoverButtonBackground, pressedButtonBackground ); + null, hoverButtonBackground, null, pressedButtonBackground ); } protected FlatScrollBarButton( int direction, String type, Color foreground, Color disabledForeground, - Color hoverForeground, Color hoverBackground, Color pressedBackground ) + Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground ) { - super( direction, type, foreground, disabledForeground, hoverForeground, hoverBackground, pressedBackground ); + super( direction, type, foreground, disabledForeground, + hoverForeground, hoverBackground, pressedForeground, pressedBackground ); setArrowWidth( FlatArrowButton.DEFAULT_ARROW_WIDTH - 2 ); setFocusable( false ); 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 0e548bc5..45d30547 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 @@ -69,6 +69,7 @@ import com.formdev.flatlaf.FlatClientProperties; * @uiDefault Spinner.buttonArrowColor Color * @uiDefault Spinner.buttonDisabledArrowColor Color * @uiDefault Spinner.buttonHoverArrowColor Color + * @uiDefault Spinner.buttonPressedArrowColor Color * @uiDefault Spinner.padding Insets * * @author Karl Tauber @@ -90,6 +91,7 @@ public class FlatSpinnerUI protected Color buttonArrowColor; protected Color buttonDisabledArrowColor; protected Color buttonHoverArrowColor; + protected Color buttonPressedArrowColor; protected Insets padding; public static ComponentUI createUI( JComponent c ) { @@ -114,6 +116,7 @@ public class FlatSpinnerUI buttonArrowColor = UIManager.getColor( "Spinner.buttonArrowColor" ); buttonDisabledArrowColor = UIManager.getColor( "Spinner.buttonDisabledArrowColor" ); buttonHoverArrowColor = UIManager.getColor( "Spinner.buttonHoverArrowColor" ); + buttonPressedArrowColor = UIManager.getColor( "Spinner.buttonPressedArrowColor" ); padding = UIManager.getInsets( "Spinner.padding" ); // scale @@ -134,6 +137,7 @@ public class FlatSpinnerUI buttonArrowColor = null; buttonDisabledArrowColor = null; buttonHoverArrowColor = null; + buttonPressedArrowColor = null; padding = null; MigLayoutVisualPadding.uninstall( spinner ); @@ -244,7 +248,7 @@ public class FlatSpinnerUI private Component createArrowButton( int direction, String name ) { FlatArrowButton button = new FlatArrowButton( direction, arrowType, buttonArrowColor, - buttonDisabledArrowColor, buttonHoverArrowColor, null ); + buttonDisabledArrowColor, buttonHoverArrowColor, null, buttonPressedArrowColor, null ); button.setName( name ); button.setYOffset( (direction == SwingConstants.NORTH) ? 1 : -1 ); if( direction == SwingConstants.NORTH ) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java index 8103cda0..1bc4a5a5 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSplitPaneUI.java @@ -52,6 +52,7 @@ import com.formdev.flatlaf.util.UIScale; * @uiDefault SplitPane.continuousLayout boolean * @uiDefault SplitPaneDivider.oneTouchArrowColor Color * @uiDefault SplitPaneDivider.oneTouchHoverArrowColor Color + * @uiDefault SplitPaneDivider.oneTouchPressedArrowColor Color * @uiDefault SplitPaneDivider.style String grip (default) or plain * @uiDefault SplitPaneDivider.gripColor Color * @uiDefault SplitPaneDivider.gripDotCount int @@ -67,6 +68,7 @@ public class FlatSplitPaneUI private Boolean continuousLayout; protected Color oneTouchArrowColor; protected Color oneTouchHoverArrowColor; + protected Color oneTouchPressedArrowColor; public static ComponentUI createUI( JComponent c ) { return new FlatSplitPaneUI(); @@ -80,12 +82,22 @@ public class FlatSplitPaneUI // used in there on LaF switching oneTouchArrowColor = UIManager.getColor( "SplitPaneDivider.oneTouchArrowColor" ); oneTouchHoverArrowColor = UIManager.getColor( "SplitPaneDivider.oneTouchHoverArrowColor" ); + oneTouchPressedArrowColor = UIManager.getColor( "SplitPaneDivider.oneTouchPressedArrowColor" ); super.installDefaults(); continuousLayout = (Boolean) UIManager.get( "SplitPane.continuousLayout" ); } + @Override + protected void uninstallDefaults() { + super.uninstallDefaults(); + + oneTouchArrowColor = null; + oneTouchHoverArrowColor = null; + oneTouchPressedArrowColor = null; + } + @Override public boolean isContinuousLayout() { return super.isContinuousLayout() || (continuousLayout != null && Boolean.TRUE.equals( continuousLayout )); @@ -185,7 +197,8 @@ public class FlatSplitPaneUI protected final boolean left; protected FlatOneTouchButton( boolean left ) { - super( SwingConstants.NORTH, arrowType, oneTouchArrowColor, null, oneTouchHoverArrowColor, null ); + super( SwingConstants.NORTH, arrowType, oneTouchArrowColor, null, + oneTouchHoverArrowColor, null, oneTouchPressedArrowColor, null ); setCursor( Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR ) ); ToolTipManager.sharedInstance().registerComponent( this ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java index b4cf9007..58693238 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java @@ -33,15 +33,12 @@ import java.awt.Shape; import java.awt.Window; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; import java.awt.geom.Ellipse2D; import java.awt.geom.Path2D; import java.awt.geom.Rectangle2D; import java.awt.geom.RoundRectangle2D; import java.util.IdentityHashMap; import java.util.WeakHashMap; -import java.util.function.Consumer; import java.util.function.Supplier; import javax.swing.JComponent; import javax.swing.JTable; @@ -680,37 +677,6 @@ public class FlatUIUtils .computeIfAbsent( key, k -> newInstanceSupplier.get() ); } - //---- class HoverListener ------------------------------------------------ - - public static class HoverListener - extends MouseAdapter - { - private final Component repaintComponent; - private final Consumer hoverChanged; - - public HoverListener( Component repaintComponent, Consumer hoverChanged ) { - this.repaintComponent = repaintComponent; - this.hoverChanged = hoverChanged; - } - - @Override - public void mouseEntered( MouseEvent e ) { - hoverChanged.accept( true ); - repaint(); - } - - @Override - public void mouseExited( MouseEvent e ) { - hoverChanged.accept( false ); - repaint(); - } - - private void repaint() { - if( repaintComponent != null && repaintComponent.isEnabled() ) - repaintComponent.repaint(); - } - } - //---- class RepaintFocusListener ----------------------------------------- public static class RepaintFocusListener 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 0839f741..333b4a7b 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -121,8 +121,9 @@ CheckBox.icon[filled].selectedPressedBackground=darken($CheckBox.icon[filled].se ComboBox.buttonEditableBackground=#404445 ComboBox.buttonArrowColor=#9A9DA1 -ComboBox.buttonDisabledArrowColor=#585858 -ComboBox.buttonHoverArrowColor=#bbb +ComboBox.buttonDisabledArrowColor=darken($ComboBox.buttonArrowColor,25%) +ComboBox.buttonHoverArrowColor=lighten($ComboBox.buttonArrowColor,10%,derived noAutoInverse) +ComboBox.buttonPressedArrowColor=lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse) #---- Component ---- @@ -251,7 +252,6 @@ Slider.disabledThumbColor=$Slider.disabledTrackColor #---- SplitPane ---- SplitPaneDivider.draggingColor=#646464 -SplitPaneDivider.oneTouchHoverArrowColor=#7A7D81 #---- TabbedPane ---- 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 95015d5c..f788129a 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -519,6 +519,7 @@ Spinner.buttonBackground=$ComboBox.buttonEditableBackground Spinner.buttonArrowColor=$ComboBox.buttonArrowColor Spinner.buttonDisabledArrowColor=$ComboBox.buttonDisabledArrowColor Spinner.buttonHoverArrowColor=$ComboBox.buttonHoverArrowColor +Spinner.buttonPressedArrowColor=$ComboBox.buttonPressedArrowColor Spinner.padding=@textComponentMargin Spinner.editorBorderPainted=false # allowed values: button or none @@ -536,6 +537,8 @@ SplitPane.oneTouchButtonOffset={scaledInteger}2 SplitPaneDivider.border=null SplitPaneDivider.oneTouchArrowColor=$ComboBox.buttonArrowColor +SplitPaneDivider.oneTouchHoverArrowColor=$ComboBox.buttonHoverArrowColor +SplitPaneDivider.oneTouchPressedArrowColor=$ComboBox.buttonPressedArrowColor # allowed values: grip or plain SplitPaneDivider.style=grip SplitPaneDivider.gripColor=@icon 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 528ec370..24cbabcf 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -128,8 +128,9 @@ CheckBox.icon[filled].selectedPressedBackground=darken($CheckBox.icon[filled].se ComboBox.buttonEditableBackground=#fafafa ComboBox.buttonArrowColor=#666 -ComboBox.buttonDisabledArrowColor=#ABABAB -ComboBox.buttonHoverArrowColor=#999 +ComboBox.buttonDisabledArrowColor=lighten($ComboBox.buttonArrowColor,25%) +ComboBox.buttonHoverArrowColor=lighten($ComboBox.buttonArrowColor,20%,derived noAutoInverse) +ComboBox.buttonPressedArrowColor=lighten($ComboBox.buttonArrowColor,30%,derived noAutoInverse) #---- Component ---- @@ -263,7 +264,6 @@ Slider.disabledThumbColor=$Slider.disabledTrackColor #---- SplitPane ---- SplitPaneDivider.draggingColor=#c4c4c4 -SplitPaneDivider.oneTouchHoverArrowColor=#333 #---- TabbedPane ---- diff --git a/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java b/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java index 105f78f6..7c988d5b 100644 --- a/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java +++ b/flatlaf-swingx/src/main/java/com/formdev/flatlaf/swingx/ui/FlatDatePickerUI.java @@ -70,6 +70,7 @@ public class FlatDatePickerUI protected Color buttonArrowColor; protected Color buttonDisabledArrowColor; protected Color buttonHoverArrowColor; + protected Color buttonPressedArrowColor; private JButton popupButton; @@ -94,6 +95,7 @@ public class FlatDatePickerUI buttonArrowColor = UIManager.getColor( "ComboBox.buttonArrowColor" ); buttonDisabledArrowColor = UIManager.getColor( "ComboBox.buttonDisabledArrowColor" ); buttonHoverArrowColor = UIManager.getColor( "ComboBox.buttonHoverArrowColor" ); + buttonPressedArrowColor = UIManager.getColor( "ComboBox.buttonPressedArrowColor" ); super.installUI( c ); @@ -140,6 +142,7 @@ public class FlatDatePickerUI buttonArrowColor = null; buttonDisabledArrowColor = null; buttonHoverArrowColor = null; + buttonPressedArrowColor = null; if( datePicker.getBorder() instanceof UIResource ) datePicker.setBorder( null ); @@ -160,7 +163,7 @@ public class FlatDatePickerUI @Override protected JButton createPopupButton() { popupButton = new FlatArrowButton( SwingConstants.SOUTH, arrowType, buttonArrowColor, - buttonDisabledArrowColor, buttonHoverArrowColor, null ); + buttonDisabledArrowColor, buttonHoverArrowColor, null, buttonPressedArrowColor, null ); popupButton.setName( "popupButton" ); return popupButton; } diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt index 606ac5d3..96f8175b 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -189,10 +189,11 @@ ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F ComboBox.buttonArrowColor #9a9da1 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonBackground #45494a javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonDarkShadow #7e7e7e javax.swing.plaf.ColorUIResource [UI] -ComboBox.buttonDisabledArrowColor #585858 javax.swing.plaf.ColorUIResource [UI] +ComboBox.buttonDisabledArrowColor #5a5d61 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonEditableBackground #404445 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonHighlight #242424 javax.swing.plaf.ColorUIResource [UI] -ComboBox.buttonHoverArrowColor #bbbbbb javax.swing.plaf.ColorUIResource [UI] +ComboBox.buttonHoverArrowColor #b4b7ba com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%) +ComboBox.buttonPressedArrowColor #cfd0d2 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) ComboBox.buttonShadow #646464 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonStyle auto ComboBox.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI] @@ -788,7 +789,7 @@ RootPaneUI com.formdev.flatlaf.ui.FlatRootPaneUI ScrollBar.allowsAbsolutePositioning true ScrollBar.background #3c3f41 javax.swing.plaf.ColorUIResource [UI] ScrollBar.buttonArrowColor #9a9da1 javax.swing.plaf.ColorUIResource [UI] -ScrollBar.buttonDisabledArrowColor #585858 javax.swing.plaf.ColorUIResource [UI] +ScrollBar.buttonDisabledArrowColor #5a5d61 javax.swing.plaf.ColorUIResource [UI] ScrollBar.foreground #bbbbbb javax.swing.plaf.ColorUIResource [UI] ScrollBar.hoverButtonBackground #484c4e com.formdev.flatlaf.util.DerivedColor [UI] lighten(5%) ScrollBar.hoverThumbColor #6e767a com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%) @@ -874,8 +875,9 @@ Spinner.background #45494a javax.swing.plaf.ColorUIResource [UI] Spinner.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI] Spinner.buttonArrowColor #9a9da1 javax.swing.plaf.ColorUIResource [UI] Spinner.buttonBackground #404445 javax.swing.plaf.ColorUIResource [UI] -Spinner.buttonDisabledArrowColor #585858 javax.swing.plaf.ColorUIResource [UI] -Spinner.buttonHoverArrowColor #bbbbbb javax.swing.plaf.ColorUIResource [UI] +Spinner.buttonDisabledArrowColor #5a5d61 javax.swing.plaf.ColorUIResource [UI] +Spinner.buttonHoverArrowColor #b4b7ba com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%) +Spinner.buttonPressedArrowColor #cfd0d2 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) Spinner.buttonStyle button Spinner.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI] Spinner.disabledForeground #888888 javax.swing.plaf.ColorUIResource [UI] @@ -908,7 +910,8 @@ SplitPaneDivider.gripDotCount 3 SplitPaneDivider.gripDotSize 3 SplitPaneDivider.gripGap 2 SplitPaneDivider.oneTouchArrowColor #9a9da1 javax.swing.plaf.ColorUIResource [UI] -SplitPaneDivider.oneTouchHoverArrowColor #7a7d81 javax.swing.plaf.ColorUIResource [UI] +SplitPaneDivider.oneTouchHoverArrowColor #b4b7ba com.formdev.flatlaf.util.DerivedColor [UI] lighten(10%) +SplitPaneDivider.oneTouchPressedArrowColor #cfd0d2 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) SplitPaneDivider.style grip diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt index 28a67042..e9f23f51 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -193,10 +193,11 @@ ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F ComboBox.buttonArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonBackground #ffffff javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonDarkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI] -ComboBox.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI] +ComboBox.buttonDisabledArrowColor #a6a6a6 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonEditableBackground #fafafa javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonHighlight #ffffff javax.swing.plaf.ColorUIResource [UI] -ComboBox.buttonHoverArrowColor #999999 javax.swing.plaf.ColorUIResource [UI] +ComboBox.buttonHoverArrowColor #999999 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) +ComboBox.buttonPressedArrowColor #b3b3b3 com.formdev.flatlaf.util.DerivedColor [UI] lighten(30%) ComboBox.buttonShadow #c4c4c4 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonStyle auto ComboBox.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] @@ -793,7 +794,7 @@ RootPaneUI com.formdev.flatlaf.ui.FlatRootPaneUI ScrollBar.allowsAbsolutePositioning true ScrollBar.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI] ScrollBar.buttonArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] -ScrollBar.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI] +ScrollBar.buttonDisabledArrowColor #a6a6a6 javax.swing.plaf.ColorUIResource [UI] ScrollBar.foreground #000000 javax.swing.plaf.ColorUIResource [UI] ScrollBar.hoverButtonBackground #e5e5e5 com.formdev.flatlaf.util.DerivedColor [UI] darken(5%) ScrollBar.hoverThumbColor #c3c3c3 com.formdev.flatlaf.util.DerivedColor [UI] darken(10%) @@ -879,8 +880,9 @@ Spinner.background #ffffff javax.swing.plaf.ColorUIResource [UI] Spinner.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI] Spinner.buttonArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] Spinner.buttonBackground #fafafa javax.swing.plaf.ColorUIResource [UI] -Spinner.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI] -Spinner.buttonHoverArrowColor #999999 javax.swing.plaf.ColorUIResource [UI] +Spinner.buttonDisabledArrowColor #a6a6a6 javax.swing.plaf.ColorUIResource [UI] +Spinner.buttonHoverArrowColor #999999 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) +Spinner.buttonPressedArrowColor #b3b3b3 com.formdev.flatlaf.util.DerivedColor [UI] lighten(30%) Spinner.buttonStyle button Spinner.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] Spinner.disabledForeground #8c8c8c javax.swing.plaf.ColorUIResource [UI] @@ -913,7 +915,8 @@ SplitPaneDivider.gripDotCount 3 SplitPaneDivider.gripDotSize 3 SplitPaneDivider.gripGap 2 SplitPaneDivider.oneTouchArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] -SplitPaneDivider.oneTouchHoverArrowColor #333333 javax.swing.plaf.ColorUIResource [UI] +SplitPaneDivider.oneTouchHoverArrowColor #999999 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20%) +SplitPaneDivider.oneTouchPressedArrowColor #b3b3b3 com.formdev.flatlaf.util.DerivedColor [UI] lighten(30%) SplitPaneDivider.style grip diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt index a5e2ed4c..616bd940 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -191,6 +191,7 @@ ComboBox.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [U ComboBox.buttonEditableBackground #cccccc javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonHighlight #ffffff javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonHoverArrowColor #ff0000 javax.swing.plaf.ColorUIResource [UI] +ComboBox.buttonPressedArrowColor #0000ff javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonShadow #a0a0a0 javax.swing.plaf.ColorUIResource [UI] ComboBox.buttonStyle auto ComboBox.disabledBackground #e0e0e0 javax.swing.plaf.ColorUIResource [UI] @@ -873,6 +874,7 @@ Spinner.buttonArrowColor #666666 javax.swing.plaf.ColorUIResource [UI] Spinner.buttonBackground #cccccc javax.swing.plaf.ColorUIResource [UI] Spinner.buttonDisabledArrowColor #ababab javax.swing.plaf.ColorUIResource [UI] Spinner.buttonHoverArrowColor #ff0000 javax.swing.plaf.ColorUIResource [UI] +Spinner.buttonPressedArrowColor #0000ff javax.swing.plaf.ColorUIResource [UI] Spinner.buttonStyle button Spinner.disabledBackground #e0e0e0 javax.swing.plaf.ColorUIResource [UI] Spinner.disabledForeground #000088 javax.swing.plaf.ColorUIResource [UI] @@ -906,6 +908,7 @@ SplitPaneDivider.gripDotSize 3 SplitPaneDivider.gripGap 2 SplitPaneDivider.oneTouchArrowColor #00ff00 javax.swing.plaf.ColorUIResource [UI] SplitPaneDivider.oneTouchHoverArrowColor #ff0000 javax.swing.plaf.ColorUIResource [UI] +SplitPaneDivider.oneTouchPressedArrowColor #0000ff javax.swing.plaf.ColorUIResource [UI] SplitPaneDivider.style grip diff --git a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties index 13b5145f..60e04c10 100644 --- a/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties +++ b/flatlaf-testing/src/main/resources/com/formdev/flatlaf/testing/FlatTestLaf.properties @@ -121,6 +121,7 @@ ComboBox.buttonEditableBackground=#ccc ComboBox.buttonArrowColor=#666 ComboBox.buttonDisabledArrowColor=#ABABAB ComboBox.buttonHoverArrowColor=#f00 +ComboBox.buttonPressedArrowColor=#00f #---- Component ---- @@ -276,6 +277,7 @@ Slider.disabledThumbColor=#880 SplitPaneDivider.draggingColor=#800 SplitPaneDivider.oneTouchArrowColor=#0f0 SplitPaneDivider.oneTouchHoverArrowColor=#f00 +SplitPaneDivider.oneTouchPressedArrowColor=#00f #---- TabbedPane ---- diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt index 4c0dc4f6..0649af44 100644 --- a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt +++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt @@ -126,6 +126,7 @@ ComboBox.buttonDisabledArrowColor ComboBox.buttonEditableBackground ComboBox.buttonHighlight ComboBox.buttonHoverArrowColor +ComboBox.buttonPressedArrowColor ComboBox.buttonShadow ComboBox.buttonStyle ComboBox.disabledBackground @@ -615,6 +616,7 @@ Spinner.buttonArrowColor Spinner.buttonBackground Spinner.buttonDisabledArrowColor Spinner.buttonHoverArrowColor +Spinner.buttonPressedArrowColor Spinner.buttonStyle Spinner.disabledBackground Spinner.disabledForeground @@ -641,6 +643,7 @@ SplitPaneDivider.gripDotSize SplitPaneDivider.gripGap SplitPaneDivider.oneTouchArrowColor SplitPaneDivider.oneTouchHoverArrowColor +SplitPaneDivider.oneTouchPressedArrowColor SplitPaneDivider.style SplitPaneUI TabbedPane.ancestorInputMap