diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java index 15779ab5..b66e3964 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java @@ -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 uiKeyInverseMapping = new HashMap<>(); private static Map checkboxKeyMapping = new HashMap<>(); private static Map checkboxDuplicateColors = new HashMap<>(); - private static Set noWildcardReplace = new HashSet<>(); static { // ComboBox @@ -470,16 +469,6 @@ public class IntelliJTheme Map.Entry[] entries = checkboxDuplicateColors.entrySet().toArray( new Map.Entry[checkboxDuplicateColors.size()] ); for( Map.Entry 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 ----------------------------------------------------- diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties index ff8d4728..d83c99cf 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties @@ -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