mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
PasswordField: fixed reveal button appearance in IntelliJ themes (issue #494)
This commit is contained in:
@@ -14,6 +14,7 @@ FlatLaf Change Log
|
||||
|
||||
#### Fixed bugs
|
||||
|
||||
- PasswordField: Fixed reveal button appearance in IntelliJ themes. (issue #494)
|
||||
- ScrollBar: Center and scale arrows in scroll up/down buttons (if shown).
|
||||
(issue #493)
|
||||
|
||||
|
||||
@@ -242,7 +242,19 @@ public class IntelliJTheme
|
||||
defaults.put( "Tree.rowHeight", 22 );
|
||||
|
||||
// apply theme specific UI defaults at the end to allow overwriting
|
||||
defaults.putAll( themeSpecificDefaults );
|
||||
for( Map.Entry<Object, Object> e : themeSpecificDefaults.entrySet() ) {
|
||||
Object key = e.getKey();
|
||||
Object value = e.getValue();
|
||||
|
||||
// append styles to existing styles
|
||||
if( key instanceof String && ((String)key).startsWith( "[style]" ) ) {
|
||||
Object oldValue = defaults.get( key );
|
||||
if( oldValue != null )
|
||||
value = oldValue + "; " + value;
|
||||
}
|
||||
|
||||
defaults.put( key, value );
|
||||
}
|
||||
}
|
||||
|
||||
private Map<Object, Object> removeThemeSpecificDefaults( UIDefaults defaults ) {
|
||||
|
||||
@@ -240,6 +240,7 @@ MenuBar.borderColor = $Separator.foreground
|
||||
#---- PasswordField ----
|
||||
|
||||
PasswordField.capsLockIconColor = #ffffff64
|
||||
PasswordField.revealIconColor = @foreground
|
||||
|
||||
|
||||
#---- Popup ----
|
||||
@@ -367,6 +368,6 @@ Tree.hash = lighten($Tree.background,5%)
|
||||
focusable: false; \
|
||||
toolbar.margin: 1,1,1,1; \
|
||||
toolbar.spacingInsets: 1,1,1,1; \
|
||||
toolbar.hoverBackground: fade(Actions.GreyInline,30%,lazy); \
|
||||
toolbar.pressedBackground: fade(Actions.GreyInline,40%,lazy); \
|
||||
toolbar.selectedBackground: fade(Actions.GreyInline,50%,lazy)
|
||||
toolbar.hoverBackground: lighten($TextField.background,5%); \
|
||||
toolbar.pressedBackground: lighten($TextField.background,10%); \
|
||||
toolbar.selectedBackground: lighten($TextField.background,15%)
|
||||
|
||||
@@ -487,7 +487,6 @@ PasswordField.showCapsLock = true
|
||||
PasswordField.showRevealButton = false
|
||||
PasswordField.capsLockIcon = com.formdev.flatlaf.icons.FlatCapsLockIcon
|
||||
PasswordField.revealIcon = com.formdev.flatlaf.icons.FlatRevealIcon
|
||||
PasswordField.revealIconColor = lazy(Actions.Grey)
|
||||
|
||||
|
||||
#---- Popup ----
|
||||
|
||||
@@ -247,6 +247,7 @@ MenuBar.borderColor = $Separator.foreground
|
||||
#---- PasswordField ----
|
||||
|
||||
PasswordField.capsLockIconColor = #00000064
|
||||
PasswordField.revealIconColor = tint(@foreground,40%)
|
||||
|
||||
|
||||
#---- Popup ----
|
||||
@@ -374,6 +375,6 @@ Tree.hash = darken($Tree.background,10%)
|
||||
focusable: false; \
|
||||
toolbar.margin: 1,1,1,1; \
|
||||
toolbar.spacingInsets: 1,1,1,1; \
|
||||
toolbar.hoverBackground: fade(Actions.GreyInline,10%,lazy); \
|
||||
toolbar.pressedBackground: fade(Actions.GreyInline,20%,lazy); \
|
||||
toolbar.selectedBackground: fade(Actions.GreyInline,30%,lazy)
|
||||
toolbar.hoverBackground: darken($TextField.background,4%); \
|
||||
toolbar.pressedBackground: darken($TextField.background,8%); \
|
||||
toolbar.selectedBackground: darken($TextField.background,12%)
|
||||
|
||||
@@ -158,6 +158,11 @@ ToggleButton.endBackground = $ToggleButton.background
|
||||
[High_contrast]ToggleButton.selectedForeground = #000
|
||||
[High_contrast]ToggleButton.disabledSelectedBackground = #444
|
||||
[High_contrast]ToggleButton.toolbar.selectedBackground = #fff
|
||||
[High_contrast][style]Button.inTextField = \
|
||||
toolbar.hoverBackground: #444; \
|
||||
toolbar.pressedBackground: #666; \
|
||||
toolbar.selectedBackground: #fff
|
||||
[High_contrast][style]ToggleButton.inTextField = $[High_contrast][style]Button.inTextField
|
||||
|
||||
[Light_Flat]TableHeader.background = #E5E5E9
|
||||
|
||||
|
||||
@@ -712,7 +712,7 @@ PasswordField.inactiveForeground #8c8c8c HSL 0 0 55 javax.swing.plaf.Co
|
||||
PasswordField.margin 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
|
||||
PasswordField.placeholderForeground #8c8c8c HSL 0 0 55 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.revealIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatRevealIcon [UI]
|
||||
PasswordField.revealIconColor [lazy] #afb1b3 HSL 210 3 69 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.revealIconColor #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.selectionBackground #4b6eaf HSL 219 40 49 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.selectionForeground #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.showCapsLock true
|
||||
@@ -1426,12 +1426,12 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
|
||||
#---- [style]Button ----
|
||||
|
||||
[style]Button.clearButton icon: com.formdev.flatlaf.icons.FlatClearIcon; focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: null; toolbar.pressedBackground: null
|
||||
[style]Button.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: fade(Actions.GreyInline,30%,lazy); toolbar.pressedBackground: fade(Actions.GreyInline,40%,lazy); toolbar.selectedBackground: fade(Actions.GreyInline,50%,lazy)
|
||||
[style]Button.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: lighten($TextField.background,5%); toolbar.pressedBackground: lighten($TextField.background,10%); toolbar.selectedBackground: lighten($TextField.background,15%)
|
||||
|
||||
|
||||
#---- [style]ToggleButton ----
|
||||
|
||||
[style]ToggleButton.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: fade(Actions.GreyInline,30%,lazy); toolbar.pressedBackground: fade(Actions.GreyInline,40%,lazy); toolbar.selectedBackground: fade(Actions.GreyInline,50%,lazy)
|
||||
[style]ToggleButton.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: lighten($TextField.background,5%); toolbar.pressedBackground: lighten($TextField.background,10%); toolbar.selectedBackground: lighten($TextField.background,15%)
|
||||
|
||||
|
||||
#---- [style]ToolBar ----
|
||||
|
||||
@@ -717,7 +717,7 @@ PasswordField.inactiveForeground #8c8c8c HSL 0 0 55 javax.swing.plaf.Co
|
||||
PasswordField.margin 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
|
||||
PasswordField.placeholderForeground #8c8c8c HSL 0 0 55 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.revealIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatRevealIcon [UI]
|
||||
PasswordField.revealIconColor [lazy] #6e6e6e HSL 0 0 43 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.revealIconColor #666666 HSL 0 0 40 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.selectionBackground #2675bf HSL 209 67 45 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.selectionForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.showCapsLock true
|
||||
@@ -1431,12 +1431,12 @@ ViewportUI com.formdev.flatlaf.ui.FlatViewportUI
|
||||
#---- [style]Button ----
|
||||
|
||||
[style]Button.clearButton icon: com.formdev.flatlaf.icons.FlatClearIcon; focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: null; toolbar.pressedBackground: null
|
||||
[style]Button.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: fade(Actions.GreyInline,10%,lazy); toolbar.pressedBackground: fade(Actions.GreyInline,20%,lazy); toolbar.selectedBackground: fade(Actions.GreyInline,30%,lazy)
|
||||
[style]Button.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: darken($TextField.background,4%); toolbar.pressedBackground: darken($TextField.background,8%); toolbar.selectedBackground: darken($TextField.background,12%)
|
||||
|
||||
|
||||
#---- [style]ToggleButton ----
|
||||
|
||||
[style]ToggleButton.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: fade(Actions.GreyInline,10%,lazy); toolbar.pressedBackground: fade(Actions.GreyInline,20%,lazy); toolbar.selectedBackground: fade(Actions.GreyInline,30%,lazy)
|
||||
[style]ToggleButton.inTextField focusable: false; toolbar.margin: 1,1,1,1; toolbar.spacingInsets: 1,1,1,1; toolbar.hoverBackground: darken($TextField.background,4%); toolbar.pressedBackground: darken($TextField.background,8%); toolbar.selectedBackground: darken($TextField.background,12%)
|
||||
|
||||
|
||||
#---- [style]ToolBar ----
|
||||
|
||||
@@ -727,7 +727,7 @@ PasswordField.inactiveForeground #000088 HSL 240 100 27 javax.swing.plaf.Co
|
||||
PasswordField.margin 2,6,2,6 javax.swing.plaf.InsetsUIResource [UI]
|
||||
PasswordField.placeholderForeground #000088 HSL 240 100 27 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.revealIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatRevealIcon [UI]
|
||||
PasswordField.revealIconColor [lazy] #6e6e6e HSL 0 0 43 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.revealIconColor #0000ff HSL 240 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.selectionBackground #00aa00 HSL 120 100 33 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.selectionForeground #ffff00 HSL 60 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||
PasswordField.showCapsLock true
|
||||
|
||||
@@ -263,6 +263,7 @@ OptionPane.icon.foreground = #fff
|
||||
#---- PasswordField ----
|
||||
|
||||
PasswordField.focusedBackground = #ff8
|
||||
PasswordField.revealIconColor = #00f
|
||||
|
||||
|
||||
#---- Popup ----
|
||||
|
||||
Reference in New Issue
Block a user