mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
ToggleButton: styling selectedForeground did not work if foreground is also styled (issue #1017)
This commit is contained in:
@@ -381,6 +381,12 @@ public class FlatButtonUI
|
||||
return ((FlatHelpButtonIcon)helpButtonIcon).applyStyleProperty( key, value );
|
||||
}
|
||||
|
||||
// update internal values; otherwise isCustomBackground() and isCustomForeground() would return wrong results
|
||||
switch( key ) {
|
||||
case "background": background = (Color) value; break;
|
||||
case "foreground": foreground = (Color) value; break;
|
||||
}
|
||||
|
||||
if( "iconTextGap".equals( key ) && value instanceof Integer )
|
||||
value = UIScale.scale( (Integer) value );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user