Menus: support switching "underline" menu selection type at any time without updating UI (issue #49)

This commit is contained in:
Karl Tauber
2020-04-29 14:46:33 +02:00
parent 395333cb3d
commit 875637bc6d
3 changed files with 4 additions and 4 deletions

View File

@@ -55,7 +55,6 @@ public class FlatMenuItemRenderer
protected final int textAcceleratorGap;
protected final int textArrowGap;
protected final String selectionType = UIManager.getString( "MenuItem.selectionType" );
protected final Color underlineSelectionBackground = UIManager.getColor( "MenuItem.underlineSelectionBackground" );
protected final Color underlineSelectionColor = UIManager.getColor( "MenuItem.underlineSelectionColor" );
protected final int underlineSelectionHeight = UIManager.getInt( "MenuItem.underlineSelectionHeight" );
@@ -340,7 +339,7 @@ debug*/
}
private boolean isUnderlineSelection() {
return "underline".equals( selectionType );
return "underline".equals( UIManager.getString( "MenuItem.selectionType" ) );
}
private Icon getIconForPainting() {