mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 14:30:56 +03:00
IntelliJ Themes: removed code that is obsolete since supporting gradient button background/border colors in commit de82dac8
make sure that gradient colors are predefined for improved compatibility this fixes button background in Arc themes and toggle button background in Dark Flat and Light Flat themes
This commit is contained in:
@@ -270,7 +270,7 @@ public class IntelliJTheme
|
||||
// (e.g. set ComboBox.buttonEditableBackground to *.background
|
||||
// because it is mapped from ComboBox.ArrowButton.background)
|
||||
String km = uiKeyInverseMapping.getOrDefault( k, (String) k );
|
||||
if( km.endsWith( tail ) && !noWildcardReplace.contains( k ) && !((String)k).startsWith( "CheckBox.icon." ) )
|
||||
if( km.endsWith( tail ) && !((String)k).startsWith( "CheckBox.icon." ) )
|
||||
defaults.put( k, uiValue );
|
||||
}
|
||||
}
|
||||
@@ -412,7 +412,6 @@ public class IntelliJTheme
|
||||
private static Map<String, String> uiKeyInverseMapping = new HashMap<>();
|
||||
private static Map<String, String> checkboxKeyMapping = new HashMap<>();
|
||||
private static Map<String, String> checkboxDuplicateColors = new HashMap<>();
|
||||
private static Set<String> noWildcardReplace = new HashSet<>();
|
||||
|
||||
static {
|
||||
// ComboBox
|
||||
@@ -470,16 +469,6 @@ public class IntelliJTheme
|
||||
Map.Entry<String, String>[] entries = checkboxDuplicateColors.entrySet().toArray( new Map.Entry[checkboxDuplicateColors.size()] );
|
||||
for( Map.Entry<String, String> e : entries )
|
||||
checkboxDuplicateColors.put( e.getValue(), e.getKey() );
|
||||
|
||||
// because FlatLaf uses Button.background and Button.borderColor,
|
||||
// but IDEA uses Button.startBackground and Button.startBorderColor,
|
||||
// our default button background and border colors may be replaced by
|
||||
// wildcard *.background and *.borderColor colors
|
||||
noWildcardReplace.add( "Button.background" );
|
||||
noWildcardReplace.add( "Button.borderColor" );
|
||||
noWildcardReplace.add( "Button.default.background" );
|
||||
noWildcardReplace.add( "Button.default.borderColor" );
|
||||
noWildcardReplace.add( "ToggleButton.background" );
|
||||
}
|
||||
|
||||
//---- class ThemeLaf -----------------------------------------------------
|
||||
|
||||
@@ -16,6 +16,16 @@
|
||||
|
||||
#---- Button ----
|
||||
|
||||
Button.startBackground=$Button.background
|
||||
Button.endBackground=$Button.background
|
||||
Button.startBorderColor=$Button.borderColor
|
||||
Button.endBorderColor=$Button.borderColor
|
||||
|
||||
Button.default.startBackground=$Button.default.background
|
||||
Button.default.endBackground=$Button.default.background
|
||||
Button.default.startBorderColor=$Button.default.borderColor
|
||||
Button.default.endBorderColor=$Button.default.borderColor
|
||||
|
||||
Button.hoverBorderColor=null
|
||||
Button.default.hoverBorderColor=null
|
||||
|
||||
@@ -23,3 +33,9 @@ Button.default.hoverBorderColor=null
|
||||
#---- HelpButton ----
|
||||
|
||||
HelpButton.hoverBorderColor=null
|
||||
|
||||
|
||||
#---- ToggleButton ----
|
||||
|
||||
ToggleButton.startBackground=$ToggleButton.background
|
||||
ToggleButton.endBackground=$ToggleButton.background
|
||||
|
||||
Reference in New Issue
Block a user