mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
IntelliJ Themes: fixes for ProgressBar
This commit is contained in:
@@ -193,14 +193,10 @@ public class IntelliJTheme
|
|||||||
} else {
|
} else {
|
||||||
uiKeys.add( key );
|
uiKeys.add( key );
|
||||||
|
|
||||||
// Darcula buttons support gradient for background and border, but FlatLaf does not
|
|
||||||
if( key.endsWith( ".startBackground" ) || key.endsWith( ".startBorderColor" ) )
|
|
||||||
key = key.replace( ".startB", ".b" );
|
|
||||||
else if( key.endsWith( ".endBackground" ) || key.endsWith( ".endBorderColor" ) )
|
|
||||||
return; // ignore
|
|
||||||
|
|
||||||
// map keys
|
// map keys
|
||||||
key = uiKeyMapping.getOrDefault( key, key );
|
key = uiKeyMapping.getOrDefault( key, key );
|
||||||
|
if( key.isEmpty() )
|
||||||
|
return; // ignore key
|
||||||
|
|
||||||
String valueStr = value.toString();
|
String valueStr = value.toString();
|
||||||
|
|
||||||
@@ -350,6 +346,17 @@ public class IntelliJTheme
|
|||||||
private static Set<String> noWildcardReplace = new HashSet<>();
|
private static Set<String> noWildcardReplace = new HashSet<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
// Button
|
||||||
|
// Darcula buttons support gradient for background and border, but FlatLaf does not
|
||||||
|
uiKeyMapping.put( "Button.startBackground", "Button.background" );
|
||||||
|
uiKeyMapping.put( "Button.startBorderColor", "Button.borderColor" );
|
||||||
|
uiKeyMapping.put( "Button.default.startBackground", "Button.default.background" );
|
||||||
|
uiKeyMapping.put( "Button.default.startBorderColor", "Button.default.borderColor" );
|
||||||
|
uiKeyMapping.put( "Button.endBackground", "" ); // ignore
|
||||||
|
uiKeyMapping.put( "Button.endBorderColor", "" ); // ignore
|
||||||
|
uiKeyMapping.put( "Button.default.endBackground", "" ); // ignore
|
||||||
|
uiKeyMapping.put( "Button.default.endBorderColor", "" ); // ignore
|
||||||
|
|
||||||
// ComboBox
|
// ComboBox
|
||||||
uiKeyMapping.put( "ComboBox.background", "ComboBox.editableBackground" );
|
uiKeyMapping.put( "ComboBox.background", "ComboBox.editableBackground" );
|
||||||
uiKeyMapping.put( "ComboBox.nonEditableBackground", "ComboBox.background" );
|
uiKeyMapping.put( "ComboBox.nonEditableBackground", "ComboBox.background" );
|
||||||
@@ -358,6 +365,12 @@ public class IntelliJTheme
|
|||||||
uiKeyMapping.put( "ComboBox.ArrowButton.iconColor", "ComboBox.buttonArrowColor" );
|
uiKeyMapping.put( "ComboBox.ArrowButton.iconColor", "ComboBox.buttonArrowColor" );
|
||||||
uiKeyMapping.put( "ComboBox.ArrowButton.nonEditableBackground", "ComboBox.buttonBackground" );
|
uiKeyMapping.put( "ComboBox.ArrowButton.nonEditableBackground", "ComboBox.buttonBackground" );
|
||||||
|
|
||||||
|
// ProgressBar
|
||||||
|
uiKeyMapping.put( "ProgressBar.background", "" ); // ignore
|
||||||
|
uiKeyMapping.put( "ProgressBar.foreground", "" ); // ignore
|
||||||
|
uiKeyMapping.put( "ProgressBar.trackColor", "ProgressBar.background" );
|
||||||
|
uiKeyMapping.put( "ProgressBar.progressColor", "ProgressBar.foreground" );
|
||||||
|
|
||||||
for( Map.Entry<String, String> e : uiKeyMapping.entrySet() )
|
for( Map.Entry<String, String> e : uiKeyMapping.entrySet() )
|
||||||
uiKeyInverseMapping.put( e.getValue(), e.getKey() );
|
uiKeyInverseMapping.put( e.getValue(), e.getKey() );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user