Browse Source

Merge pull request #670 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '4dbdafee4076961d4677cf36827e8b63240dd9a9':
  REPORT-13310 设计器来回切换模板, 非常卡
bugfix/10.0
Hades 6 years ago
parent
commit
b5b5752815
  1. 8
      designer-base/src/main/java/com/fr/design/gui/imenu/UIBasicMenuItemUI.java

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

@ -667,19 +667,11 @@ public class UIBasicMenuItemUI extends MenuItemUI {
} }
private void installFont(final String prefix, final JComponent menuItem) { private void installFont(final String prefix, final JComponent menuItem) {
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
if (menuItem == null) { if (menuItem == null) {
return; return;
} }
LookAndFeel.installColorsAndFont(menuItem, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installColorsAndFont(menuItem, prefix + ".background", prefix + ".foreground", prefix + ".font");
} }
});
thread.setName("UIBasicMenuItemUI");
thread.setDaemon(true);
thread.start();
}
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon,
Icon arrowIcon, int defaultTextIconGap) { Icon arrowIcon, int defaultTextIconGap) {

Loading…
Cancel
Save