Browse Source

Merge pull request #121 in DESIGN/design from ~NEIL/design-10:feature/10.0 to feature/10.0

* commit 'b92d50fe195e10833d63d098764930f2b14f3aa2':
  无JIRA任务,npe
master
neil 6 years ago
parent
commit
6fc546be3c
  1. 7
      designer-base/src/com/fr/design/gui/imenu/UIBasicMenuItemUI.java

7
designer-base/src/com/fr/design/gui/imenu/UIBasicMenuItemUI.java

@ -629,7 +629,7 @@ public class UIBasicMenuItemUI extends MenuItemUI {
LookAndFeel.installBorder(menuItem, prefix + ".border");
oldBorderPainted = menuItem.isBorderPainted();
menuItem.setBorderPainted(((Boolean) (UIManager.get(prefix + ".borderPainted"))).booleanValue());
installFont(prefix);
installFont(prefix, menuItem);
// MenuItem specific defaults
if (selectionBackground == null || selectionBackground instanceof UIResource) {
@ -666,10 +666,13 @@ public class UIBasicMenuItemUI extends MenuItemUI {
defaultIconGap = DEFAULT_ICON_GAP; // Should be from table
}
private void installFont(final String prefix) {
private void installFont(final String prefix, final JComponent menuItem) {
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
if (menuItem == null) {
return;
}
LookAndFeel.installColorsAndFont(menuItem, prefix + ".background", prefix + ".foreground", prefix + ".font");
}
});

Loading…
Cancel
Save