mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
CheckBox: fixed colors in light IntelliJ themes (issue #126)
This commit is contained in:
@@ -9,6 +9,7 @@ FlatLaf Change Log
|
||||
- Custom window decorations: Center title if menu bar is embedded.
|
||||
- Custom window decorations: Cursor of components (e.g. TextField) was not
|
||||
changed. (issue #125)
|
||||
- CheckBox: Fixed colors in light IntelliJ themes. (issue #126)
|
||||
- InternalFrame: Use default icon in internal frames. (issue #122)
|
||||
|
||||
|
||||
|
||||
@@ -412,6 +412,10 @@ public class IntelliJTheme
|
||||
|
||||
String newKey = checkboxKeyMapping.get( key );
|
||||
if( newKey != null ) {
|
||||
String checkBoxIconPrefix = "CheckBox.icon.";
|
||||
if( !dark && newKey.startsWith( checkBoxIconPrefix ) )
|
||||
newKey = "CheckBox.icon[filled].".concat( newKey.substring( checkBoxIconPrefix.length() ) );
|
||||
|
||||
ColorUIResource color = toColor( (String) value );
|
||||
if( color != null ) {
|
||||
defaults.put( newKey, color );
|
||||
@@ -444,12 +448,23 @@ public class IntelliJTheme
|
||||
|
||||
// remove hover and pressed colors
|
||||
if( checkboxModified ) {
|
||||
defaults.remove( "CheckBox.icon.focusWidth" );
|
||||
defaults.remove( "CheckBox.icon.hoverBorderColor" );
|
||||
defaults.remove( "CheckBox.icon.focusedBackground" );
|
||||
defaults.remove( "CheckBox.icon.hoverBackground" );
|
||||
defaults.remove( "CheckBox.icon.pressedBackground" );
|
||||
defaults.remove( "CheckBox.icon.selectedFocusedBackground" );
|
||||
defaults.remove( "CheckBox.icon.selectedHoverBackground" );
|
||||
defaults.remove( "CheckBox.icon.selectedPressedBackground" );
|
||||
|
||||
defaults.remove( "CheckBox.icon[filled].focusWidth" );
|
||||
defaults.remove( "CheckBox.icon[filled].hoverBorderColor" );
|
||||
defaults.remove( "CheckBox.icon[filled].focusedBackground" );
|
||||
defaults.remove( "CheckBox.icon[filled].hoverBackground" );
|
||||
defaults.remove( "CheckBox.icon[filled].pressedBackground" );
|
||||
defaults.remove( "CheckBox.icon[filled].selectedFocusedBackground" );
|
||||
defaults.remove( "CheckBox.icon[filled].selectedHoverBackground" );
|
||||
defaults.remove( "CheckBox.icon[filled].selectedPressedBackground" );
|
||||
}
|
||||
|
||||
// copy values
|
||||
|
||||
@@ -36,7 +36,6 @@ Button.default.borderWidth=1
|
||||
#---- CheckBox ----
|
||||
|
||||
CheckBox.icon.style=filled
|
||||
CheckBox.icon[filled].focusWidth=2
|
||||
|
||||
|
||||
#---- Component ----
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
|
||||
+ CheckBox.icon.style filled
|
||||
|
||||
+ CheckBox.icon[filled].focusWidth 2
|
||||
|
||||
- CheckBox.icon[filled].selectedFocusedCheckmarkColor #e3f1fa javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
- ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI]
|
||||
|
||||
@@ -76,7 +76,6 @@ CheckBox.icon.selectedFocusedBorderColor
|
||||
CheckBox.icon.style
|
||||
CheckBox.iconTextGap
|
||||
CheckBox.icon[filled].checkmarkColor
|
||||
CheckBox.icon[filled].focusWidth
|
||||
CheckBox.icon[filled].selectedBackground
|
||||
CheckBox.icon[filled].selectedBorderColor
|
||||
CheckBox.icon[filled].selectedFocusedBackground
|
||||
|
||||
Reference in New Issue
Block a user