From 0bcdc1490980b4fa5ae74b5046691387af331671 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 31 Jan 2021 20:02:24 +0100 Subject: [PATCH] - Button: - In "Flat Light" theme, changed styles of focused and default buttons to avoid confusion with all other themes. Focused buttons now have a white background (was light blue) and a slightly wider border. The default button now has a light blue background (was white) and a thin border. In all other themes the default button also has colored background. - In "Flat Dark" theme, use slightly wider border for focused buttons. - CheckBox and RadioButton: In "Flat Dark" theme, use blueish background for focused components. --- CHANGELOG.md | 9 ++++++ .../flatlaf/icons/FlatCheckBoxIcon.java | 10 +++++-- .../flatlaf/icons/FlatHelpButtonIcon.java | 30 ++++++++++++++++--- .../com/formdev/flatlaf/ui/FlatBorder.java | 9 +++++- .../formdev/flatlaf/ui/FlatButtonBorder.java | 7 +++++ .../formdev/flatlaf/FlatDarculaLaf.properties | 7 +++++ .../formdev/flatlaf/FlatDarkLaf.properties | 1 + .../flatlaf/FlatIntelliJLaf.properties | 4 +-- .../com/formdev/flatlaf/FlatLaf.properties | 5 +++- .../formdev/flatlaf/FlatLightLaf.properties | 7 ++--- .../uidefaults/FlatDarculaLaf_1.8.0_202.txt | 8 +++++ .../uidefaults/FlatDarkLaf_1.8.0_202.txt | 4 +++ .../uidefaults/FlatIntelliJLaf_1.8.0_202.txt | 19 +++++------- .../uidefaults/FlatLightLaf_1.8.0_202.txt | 14 ++++----- .../uidefaults/FlatTestLaf_1.8.0_202.txt | 3 ++ .../flatlaf/testing/FlatTestLaf.properties | 1 + .../flatlaf/themeeditor/FlatLafUIKeys.txt | 3 ++ 17 files changed, 108 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f04f6a34..c9ffdc34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ FlatLaf Change Log #### New features and improvements +- Button: + - In "Flat Light" theme, changed styles of focused and default buttons to + avoid confusion with all other themes. Focused buttons now have a white + background (was light blue) and a slightly wider border. The default button + now has a light blue background (was white) and a thin border. In all other + themes the default button also has colored background. + - In "Flat Dark" theme, use slightly wider border for focused buttons. +- CheckBox and RadioButton: In "Flat Dark" theme, use blueish background for + focused components. - Tree: Support disabling wide selection per component. (set client property `JTree.wideSelection` to `false`). (PR #245) - Tree: Support disabling selection painting per component. Then the tree cell diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java index 67267b92..c74c6976 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatCheckBoxIcon.java @@ -146,8 +146,14 @@ public class FlatCheckBoxIcon paintBorder( c, g ); // paint background - g.setColor( FlatUIUtils.deriveColor( getBackground( c, selected ), - selected ? selectedBackground : background ) ); + Color bg = FlatUIUtils.deriveColor( getBackground( c, selected ), + selected ? selectedBackground : background ); + if( bg.getAlpha() < 255 ) { + // fill background with default color before filling with non-opaque background + g.setColor( selected ? selectedBackground : background ); + paintBackground( c, g ); + } + g.setColor( bg ); paintBackground( c, g ); // paint checkmark diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatHelpButtonIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatHelpButtonIcon.java index e996f785..9283b49d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatHelpButtonIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatHelpButtonIcon.java @@ -31,6 +31,8 @@ import com.formdev.flatlaf.ui.FlatUIUtils; * * @uiDefault Component.focusWidth int * @uiDefault Component.focusColor Color + * @uiDefault HelpButton.innerFocusWidth int or float optional; defaults to Component.innerFocusWidth + * @uiDefault HelpButton.borderWidth int optional; default is 1 * @uiDefault HelpButton.borderColor Color * @uiDefault HelpButton.disabledBorderColor Color * @uiDefault HelpButton.focusedBorderColor Color @@ -50,6 +52,8 @@ public class FlatHelpButtonIcon { protected final int focusWidth = UIManager.getInt( "Component.focusWidth" ); protected final Color focusColor = UIManager.getColor( "Component.focusColor" ); + protected final float innerFocusWidth = FlatUIUtils.getUIFloat( "HelpButton.innerFocusWidth", FlatUIUtils.getUIFloat( "Component.innerFocusWidth", 0 ) ); + protected final int borderWidth = FlatUIUtils.getUIInt( "HelpButton.borderWidth", 1 ); protected final Color borderColor = UIManager.getColor( "HelpButton.borderColor" ); protected final Color disabledBorderColor = UIManager.getColor( "HelpButton.disabledBorderColor" ); @@ -84,12 +88,18 @@ public class FlatHelpButtonIcon boolean enabled = c.isEnabled(); boolean focused = FlatUIUtils.isPermanentFocusOwner( c ); - // paint focused border + float xy = 0.5f; + float wh = iconSize - 1; + + // paint outer focus border if( focused && FlatButtonUI.isFocusPainted( c ) ) { g2.setColor( focusColor ); - g2.fill( new Ellipse2D.Float( 0.5f, 0.5f, iconSize - 1, iconSize - 1 ) ); + g2.fill( new Ellipse2D.Float( xy, xy, wh, wh ) ); } + xy += focusWidth; + wh -= (focusWidth * 2); + // paint border g2.setColor( FlatButtonUI.buttonStateColor( c, borderColor, @@ -97,7 +107,19 @@ public class FlatHelpButtonIcon focusedBorderColor, hoverBorderColor, null ) ); - g2.fill( new Ellipse2D.Float( focusWidth + 0.5f, focusWidth + 0.5f, 21, 21 ) ); + g2.fill( new Ellipse2D.Float( xy, xy, wh, wh ) ); + + xy += borderWidth; + wh -= (borderWidth * 2); + + // paint inner focus border + if( innerFocusWidth > 0 && focused && FlatButtonUI.isFocusPainted( c ) ) { + g2.setColor( focusColor ); + g2.fill( new Ellipse2D.Float( xy, xy, wh, wh ) ); + + xy += innerFocusWidth; + wh -= (innerFocusWidth * 2); + } // paint background g2.setColor( FlatUIUtils.deriveColor( FlatButtonUI.buttonStateColor( c, @@ -106,7 +128,7 @@ public class FlatHelpButtonIcon focusedBackground, hoverBackground, pressedBackground ), background ) ); - g2.fill( new Ellipse2D.Float( focusWidth + 1.5f, focusWidth + 1.5f, 19, 19 ) ); + g2.fill( new Ellipse2D.Float( xy, xy, wh, wh ) ); // paint question mark Path2D q = new Path2D.Float(); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatBorder.java index fe7504d7..3e182388 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatBorder.java @@ -94,7 +94,7 @@ public class FlatBorder // paint outer border if( outlineColor != null || isFocused( c ) ) { float innerWidth = !isCellEditor( c ) && !(c instanceof JScrollPane) - ? (outlineColor != null ? innerOutlineWidth : innerFocusWidth) + ? (outlineColor != null ? innerOutlineWidth : getInnerFocusWidth( c )) : 0; g2.setColor( (outlineColor != null) ? outlineColor : getFocusColor( c ) ); @@ -235,6 +235,13 @@ public class FlatBorder return focusWidth; } + /** + * Returns the (unscaled) thickness of the inner focus border. + */ + protected float getInnerFocusWidth( Component c ) { + return innerFocusWidth; + } + /** * Returns the (unscaled) line thickness used to compute the border insets. * This may be different to {@link #getBorderWidth}. diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java index d379c177..288b658a 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java @@ -44,6 +44,7 @@ import com.formdev.flatlaf.util.UIScale; * @uiDefault Button.default.focusColor Color * @uiDefault Button.borderWidth int * @uiDefault Button.default.borderWidth int + * @uiDefault Button.innerFocusWidth int or float optional; defaults to Component.innerFocusWidth * @uiDefault Button.toolbar.margin Insets * @uiDefault Button.toolbar.spacingInsets Insets * @uiDefault Button.arc int @@ -65,6 +66,7 @@ public class FlatButtonBorder protected final Color defaultFocusColor = UIManager.getColor( "Button.default.focusColor" ); protected final int borderWidth = UIManager.getInt( "Button.borderWidth" ); protected final int defaultBorderWidth = UIManager.getInt( "Button.default.borderWidth" ); + protected final float buttonInnerFocusWidth = FlatUIUtils.getUIFloat( "Button.innerFocusWidth", innerFocusWidth ); protected final Insets toolbarMargin = UIManager.getInsets( "Button.toolbar.margin" ); protected final Insets toolbarSpacingInsets = UIManager.getInsets( "Button.toolbar.spacingInsets" ); protected final int arc = UIManager.getInt( "Button.arc" ); @@ -134,6 +136,11 @@ public class FlatButtonBorder return FlatToggleButtonUI.isTabButton( c ) ? 0 : super.getFocusWidth( c ); } + @Override + protected float getInnerFocusWidth( Component c ) { + return buttonInnerFocusWidth; + } + @Override protected int getBorderWidth( Component c ) { return FlatButtonUI.isDefaultButton( c ) ? defaultBorderWidth : borderWidth; diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties index 8eed74fb..2c3d196a 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties @@ -33,9 +33,16 @@ #---- Button ---- +Button.innerFocusWidth = 0 + Button.default.boldText = true +#---- CheckBox ---- + +CheckBox.icon.focusedBackground = null + + #---- Component ---- Component.focusWidth = 2 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 a6df7a75..e2db6380 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -115,6 +115,7 @@ CheckBox.icon.disabledCheckmarkColor = #606060 # focused CheckBox.icon.focusedBorderColor = #466D94 +CheckBox.icon.focusedBackground = fade($CheckBox.icon.focusedBorderColor,30%) # hover CheckBox.icon.hoverBorderColor = $CheckBox.icon.focusedBorderColor diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties index 550459f4..0f4bf9e2 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties @@ -33,11 +33,10 @@ #---- Button ---- -Button.focusedBackground = null +Button.innerFocusWidth = 0 Button.default.background = #4D8AC9 Button.default.foreground = #fff -Button.default.focusedBackground = null Button.default.borderColor = #3D75B2 Button.default.hoverBorderColor = #A9C9F5 Button.default.focusedBorderColor = #A9C9F5 @@ -49,6 +48,7 @@ Button.default.borderWidth = 1 #---- CheckBox ---- CheckBox.icon.style = filled +CheckBox.icon.focusedBackground = null #---- 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 464bae54..40b619de 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -164,6 +164,7 @@ Button.defaultButtonFollowsFocus = false Button.borderWidth = 1 Button.default.borderWidth = 1 +Button.innerFocusWidth = 1 Button.toolbar.margin = 3,3,3,3 Button.toolbar.spacingInsets = 1,2,1,2 @@ -284,12 +285,14 @@ HelpButton.focusedBorderColor = $CheckBox.icon.focusedBorderColor HelpButton.hoverBorderColor = $?CheckBox.icon.hoverBorderColor HelpButton.background = $CheckBox.icon.background HelpButton.disabledBackground = $CheckBox.icon.disabledBackground -HelpButton.focusedBackground = $?CheckBox.icon.focusedBackground HelpButton.hoverBackground = $?CheckBox.icon.hoverBackground HelpButton.pressedBackground = $?CheckBox.icon.pressedBackground HelpButton.questionMarkColor = $CheckBox.icon.checkmarkColor HelpButton.disabledQuestionMarkColor = $CheckBox.icon.disabledCheckmarkColor +HelpButton.borderWidth = $Button.borderWidth +HelpButton.innerFocusWidth = $Button.innerFocusWidth + #---- InternalFrame ---- 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 4af3fb36..98d09f41 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -73,7 +73,6 @@ controlDkShadow = darken($controlShadow,15%) #---- Button ---- Button.background = #fff -Button.focusedBackground = #e3f1fa Button.hoverBackground = darken($Button.background,3%,derived) Button.pressedBackground = darken($Button.background,10%,derived) Button.selectedBackground = darken($Button.background,20%,derived) @@ -85,16 +84,14 @@ Button.disabledBorderColor = $Component.disabledBorderColor Button.focusedBorderColor = $Component.focusedBorderColor Button.hoverBorderColor = $Button.focusedBorderColor -Button.default.background = $Button.background +Button.default.background = #e3f1fa Button.default.foreground = @foreground -Button.default.focusedBackground = $Button.focusedBackground Button.default.hoverBackground = darken($Button.default.background,3%,derived) Button.default.pressedBackground = darken($Button.default.background,10%,derived) Button.default.borderColor = #4F9EE3 Button.default.hoverBorderColor = $Button.hoverBorderColor Button.default.focusedBorderColor = $Button.focusedBorderColor Button.default.focusColor = $Component.focusColor -Button.default.borderWidth = 2 Button.toolbar.hoverBackground = darken($Button.background,12%,derived) Button.toolbar.pressedBackground = darken($Button.background,15%,derived) @@ -117,7 +114,7 @@ CheckBox.icon.disabledCheckmarkColor = #ABABAB # focused CheckBox.icon.focusedBorderColor = #7B9FC7 -CheckBox.icon.focusedBackground = $Button.focusedBackground +CheckBox.icon.focusedBackground = #e3f1fa # hover CheckBox.icon.hoverBorderColor = $CheckBox.icon.focusedBorderColor diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarculaLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarculaLaf_1.8.0_202.txt index d4e91e74..86389208 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarculaLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarculaLaf_1.8.0_202.txt @@ -10,6 +10,11 @@ - Button.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatButtonBorder [UI] + Button.border [lazy] 3,3,3,3 false com.formdev.flatlaf.ui.FlatButtonBorder [UI] +- Button.innerFocusWidth 1 ++ Button.innerFocusWidth 0 + +- CheckBox.icon.focusedBackground #4d466d94 javax.swing.plaf.ColorUIResource [UI] + - ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI] + ComboBox.border [lazy] 3,3,3,3 false com.formdev.flatlaf.ui.FlatRoundBorder [UI] @@ -31,6 +36,9 @@ - HelpButton.icon [lazy] 22,22 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI] + HelpButton.icon [lazy] 26,26 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI] +- HelpButton.innerFocusWidth 1 ++ HelpButton.innerFocusWidth 0 + - JXDatePicker.border [lazy] 1,1,1,1 false com.formdev.flatlaf.swingx.ui.FlatDatePickerBorder [UI] + JXDatePicker.border [lazy] 3,3,3,3 false com.formdev.flatlaf.swingx.ui.FlatDatePickerBorder [UI] 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 d3c14ae6..86797471 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt @@ -89,6 +89,7 @@ Button.highlight #242424 javax.swing.plaf.ColorUIResource [UI] Button.hoverBackground #53585a com.formdev.flatlaf.util.DerivedColor [UI] lighten(3% autoInverse) Button.hoverBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI] Button.iconTextGap 4 +Button.innerFocusWidth 1 Button.light #313131 javax.swing.plaf.ColorUIResource [UI] Button.margin 2,14,2,14 javax.swing.plaf.InsetsUIResource [UI] Button.minimumWidth 72 @@ -126,6 +127,7 @@ CheckBox.icon.checkmarkColor #a7a7a7 javax.swing.plaf.ColorUIResource [UI] CheckBox.icon.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI] CheckBox.icon.disabledBorderColor #545556 javax.swing.plaf.ColorUIResource [UI] CheckBox.icon.disabledCheckmarkColor #606060 javax.swing.plaf.ColorUIResource [UI] +CheckBox.icon.focusedBackground #4d466d94 javax.swing.plaf.ColorUIResource [UI] CheckBox.icon.focusedBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI] CheckBox.icon.hoverBackground #4a5152 com.formdev.flatlaf.util.DerivedColor [UI] lighten(3% autoInverse) CheckBox.icon.hoverBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI] @@ -326,6 +328,7 @@ HeaderUI com.formdev.flatlaf.swingx.ui.FlatHeaderUI HelpButton.background #43494a javax.swing.plaf.ColorUIResource [UI] HelpButton.borderColor #6b6b6b javax.swing.plaf.ColorUIResource [UI] +HelpButton.borderWidth 1 HelpButton.disabledBackground #3c3f41 javax.swing.plaf.ColorUIResource [UI] HelpButton.disabledBorderColor #545556 javax.swing.plaf.ColorUIResource [UI] HelpButton.disabledQuestionMarkColor #606060 javax.swing.plaf.ColorUIResource [UI] @@ -333,6 +336,7 @@ HelpButton.focusedBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI] HelpButton.hoverBackground #4a5152 com.formdev.flatlaf.util.DerivedColor [UI] lighten(3% autoInverse) HelpButton.hoverBorderColor #466d94 javax.swing.plaf.ColorUIResource [UI] HelpButton.icon [lazy] 22,22 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI] +HelpButton.innerFocusWidth 1 HelpButton.pressedBackground #52595a com.formdev.flatlaf.util.DerivedColor [UI] lighten(6% autoInverse) HelpButton.questionMarkColor #a7a7a7 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatIntelliJLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatIntelliJLaf_1.8.0_202.txt index 673508d6..9aa42033 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatIntelliJLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatIntelliJLaf_1.8.0_202.txt @@ -10,7 +10,7 @@ - Button.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatButtonBorder [UI] + Button.border [lazy] 3,3,3,3 false com.formdev.flatlaf.ui.FlatButtonBorder [UI] -- Button.default.background #ffffff javax.swing.plaf.ColorUIResource [UI] +- Button.default.background #e3f1fa javax.swing.plaf.ColorUIResource [UI] + Button.default.background #4d8ac9 javax.swing.plaf.ColorUIResource [UI] + Button.default.boldText true @@ -18,27 +18,23 @@ - Button.default.borderColor #4f9ee3 javax.swing.plaf.ColorUIResource [UI] + Button.default.borderColor #3d75b2 javax.swing.plaf.ColorUIResource [UI] -- Button.default.borderWidth 2 -+ Button.default.borderWidth 1 - -- Button.default.focusedBackground #e3f1fa javax.swing.plaf.ColorUIResource [UI] - - Button.default.focusedBorderColor #87afda javax.swing.plaf.ColorUIResource [UI] + Button.default.focusedBorderColor #a9c9f5 javax.swing.plaf.ColorUIResource [UI] - Button.default.foreground #000000 javax.swing.plaf.ColorUIResource [UI] + Button.default.foreground #ffffff javax.swing.plaf.ColorUIResource [UI] -- Button.default.hoverBackground #f7f7f7 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse) +- Button.default.hoverBackground #d6ebf8 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse) + Button.default.hoverBackground #4182c5 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse) - Button.default.hoverBorderColor #87afda javax.swing.plaf.ColorUIResource [UI] + Button.default.hoverBorderColor #a9c9f5 javax.swing.plaf.ColorUIResource [UI] -- Button.default.pressedBackground #e6e6e6 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) +- Button.default.pressedBackground #b8dbf2 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) + Button.default.pressedBackground #3571ae com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) -- Button.focusedBackground #e3f1fa javax.swing.plaf.ColorUIResource [UI] +- Button.innerFocusWidth 1 ++ Button.innerFocusWidth 0 - CheckBox.icon.focusedBackground #e3f1fa javax.swing.plaf.ColorUIResource [UI] @@ -64,11 +60,12 @@ - FormattedTextField.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatTextBorder [UI] + FormattedTextField.border [lazy] 3,3,3,3 false com.formdev.flatlaf.ui.FlatTextBorder [UI] -- HelpButton.focusedBackground #e3f1fa javax.swing.plaf.ColorUIResource [UI] - - HelpButton.icon [lazy] 22,22 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI] + HelpButton.icon [lazy] 26,26 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI] +- HelpButton.innerFocusWidth 1 ++ HelpButton.innerFocusWidth 0 + - JXDatePicker.border [lazy] 1,1,1,1 false com.formdev.flatlaf.swingx.ui.FlatDatePickerBorder [UI] + JXDatePicker.border [lazy] 3,3,3,3 false com.formdev.flatlaf.swingx.ui.FlatDatePickerBorder [UI] 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 8cbdc40a..98e2dc1f 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt @@ -67,22 +67,20 @@ Button.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.F Button.borderColor #c4c4c4 javax.swing.plaf.ColorUIResource [UI] Button.borderWidth 1 Button.darkShadow #9e9e9e javax.swing.plaf.ColorUIResource [UI] -Button.default.background #ffffff javax.swing.plaf.ColorUIResource [UI] +Button.default.background #e3f1fa javax.swing.plaf.ColorUIResource [UI] Button.default.borderColor #4f9ee3 javax.swing.plaf.ColorUIResource [UI] -Button.default.borderWidth 2 +Button.default.borderWidth 1 Button.default.focusColor #97c3f3 javax.swing.plaf.ColorUIResource [UI] -Button.default.focusedBackground #e3f1fa javax.swing.plaf.ColorUIResource [UI] Button.default.focusedBorderColor #87afda javax.swing.plaf.ColorUIResource [UI] Button.default.foreground #000000 javax.swing.plaf.ColorUIResource [UI] -Button.default.hoverBackground #f7f7f7 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse) +Button.default.hoverBackground #d6ebf8 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse) Button.default.hoverBorderColor #87afda javax.swing.plaf.ColorUIResource [UI] -Button.default.pressedBackground #e6e6e6 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) +Button.default.pressedBackground #b8dbf2 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) Button.defaultButtonFollowsFocus false Button.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] Button.disabledBorderColor #cfcfcf javax.swing.plaf.ColorUIResource [UI] Button.disabledSelectedBackground #dedede com.formdev.flatlaf.util.DerivedColor [UI] darken(13% autoInverse) Button.disabledText #8c8c8c javax.swing.plaf.ColorUIResource [UI] -Button.focusedBackground #e3f1fa javax.swing.plaf.ColorUIResource [UI] Button.focusedBorderColor #87afda javax.swing.plaf.ColorUIResource [UI] Button.font [active] $defaultFont [UI] Button.foreground #000000 javax.swing.plaf.ColorUIResource [UI] @@ -90,6 +88,7 @@ Button.highlight #ffffff javax.swing.plaf.ColorUIResource [UI] Button.hoverBackground #f7f7f7 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse) Button.hoverBorderColor #87afda javax.swing.plaf.ColorUIResource [UI] Button.iconTextGap 4 +Button.innerFocusWidth 1 Button.light #e3e3e3 javax.swing.plaf.ColorUIResource [UI] Button.margin 2,14,2,14 javax.swing.plaf.InsetsUIResource [UI] Button.minimumWidth 72 @@ -331,14 +330,15 @@ HeaderUI com.formdev.flatlaf.swingx.ui.FlatHeaderUI HelpButton.background #ffffff javax.swing.plaf.ColorUIResource [UI] HelpButton.borderColor #b0b0b0 javax.swing.plaf.ColorUIResource [UI] +HelpButton.borderWidth 1 HelpButton.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] HelpButton.disabledBorderColor #bdbdbd javax.swing.plaf.ColorUIResource [UI] HelpButton.disabledQuestionMarkColor #ababab javax.swing.plaf.ColorUIResource [UI] -HelpButton.focusedBackground #e3f1fa javax.swing.plaf.ColorUIResource [UI] HelpButton.focusedBorderColor #7b9fc7 javax.swing.plaf.ColorUIResource [UI] HelpButton.hoverBackground #f7f7f7 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse) HelpButton.hoverBorderColor #7b9fc7 javax.swing.plaf.ColorUIResource [UI] HelpButton.icon [lazy] 22,22 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI] +HelpButton.innerFocusWidth 1 HelpButton.pressedBackground #e6e6e6 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse) HelpButton.questionMarkColor #4f9ee3 javax.swing.plaf.ColorUIResource [UI] 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 06e30301..cce64d58 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt @@ -92,6 +92,7 @@ Button.highlight #ffffff javax.swing.plaf.ColorUIResource [UI] Button.hoverBackground #ffff00 javax.swing.plaf.ColorUIResource [UI] Button.hoverBorderColor #ff0000 javax.swing.plaf.ColorUIResource [UI] Button.iconTextGap 4 +Button.innerFocusWidth 1 Button.light #e3e3e3 javax.swing.plaf.ColorUIResource [UI] Button.margin 2,14,2,14 javax.swing.plaf.InsetsUIResource [UI] Button.minimumWidth 72 @@ -319,6 +320,7 @@ HeaderUI com.formdev.flatlaf.swingx.ui.FlatHeaderUI HelpButton.background #ffffff javax.swing.plaf.ColorUIResource [UI] HelpButton.borderColor #878787 javax.swing.plaf.ColorUIResource [UI] +HelpButton.borderWidth 1 HelpButton.disabledBackground #f2f2f2 javax.swing.plaf.ColorUIResource [UI] HelpButton.disabledBorderColor #bdbdbd javax.swing.plaf.ColorUIResource [UI] HelpButton.disabledQuestionMarkColor #ababab javax.swing.plaf.ColorUIResource [UI] @@ -327,6 +329,7 @@ HelpButton.focusedBorderColor #7b9fc7 javax.swing.plaf.ColorUIResource [UI] HelpButton.hoverBackground #ffff00 javax.swing.plaf.ColorUIResource [UI] HelpButton.hoverBorderColor #ff0000 javax.swing.plaf.ColorUIResource [UI] HelpButton.icon [lazy] 22,22 com.formdev.flatlaf.icons.FlatHelpButtonIcon [UI] +HelpButton.innerFocusWidth 1 HelpButton.pressedBackground #ffc800 javax.swing.plaf.ColorUIResource [UI] HelpButton.questionMarkColor #0000ff javax.swing.plaf.ColorUIResource [UI] 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 fef4f47f..ebad92a2 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 @@ -149,6 +149,7 @@ DesktopIcon.background = darken($Desktop.background,20%) #---- HelpButton ---- +HelpButton.focusedBackground = #0ff HelpButton.questionMarkColor = #00f 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 6d1f1e90..87cf05c8 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 @@ -39,6 +39,7 @@ Button.highlight Button.hoverBackground Button.hoverBorderColor Button.iconTextGap +Button.innerFocusWidth Button.light Button.margin Button.minimumWidth @@ -236,6 +237,7 @@ FormattedTextFieldUI HeaderUI HelpButton.background HelpButton.borderColor +HelpButton.borderWidth HelpButton.disabledBackground HelpButton.disabledBorderColor HelpButton.disabledQuestionMarkColor @@ -244,6 +246,7 @@ HelpButton.focusedBorderColor HelpButton.hoverBackground HelpButton.hoverBorderColor HelpButton.icon +HelpButton.innerFocusWidth HelpButton.pressedBackground HelpButton.questionMarkColor Hyperlink.disabledText