Styling: MenuItem: support styling acceleratorFont

Theme Editor:
- support font keys in auto-completion
- ignore Menu.acceleratorFont, CheckBoxMenuItem.acceleratorFont and RadioButtonMenuItem.acceleratorFont because they are never used (keep UI values for backward compatibility)
This commit is contained in:
Karl Tauber
2021-12-11 11:17:53 +01:00
parent 6205e18c45
commit 2164bd363b
6 changed files with 16 additions and 15 deletions

View File

@@ -87,8 +87,15 @@ public class UIDefaultsKeysDump
UIDefaults defaults = UIManager.getLookAndFeel().getDefaults();
for( Object key : defaults.keySet() ) {
if( key instanceof String && !((String)key).startsWith( "FlatLaf.internal." ) )
if( key instanceof String && !ignoreKey( (String) key ) )
keys.add( (String) key );
}
}
private static boolean ignoreKey( String key ) {
return key.startsWith( "FlatLaf.internal." ) ||
key.equals( "Menu.acceleratorFont" ) ||
key.equals( "CheckBoxMenuItem.acceleratorFont" ) ||
key.equals( "RadioButtonMenuItem.acceleratorFont" );
}
}