Browse Source

Avoid popup installation if decorations are disabled.

pull/130/head
weisj 5 years ago
parent
commit
93a2c01bd0
  1. 2
      core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java

2
core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java

@ -86,11 +86,13 @@ public class DarkPopupFactory extends PopupFactory {
window.setFocusableWindowState(true); window.setFocusableWindowState(true);
} }
if (DecorationsHandler.getSharedInstance().isCustomDecorationSupported()) {
if (install) { if (install) {
DecorationsHandler.getSharedInstance().installPopupWindow(window); DecorationsHandler.getSharedInstance().installPopupWindow(window);
} else { } else {
DecorationsHandler.getSharedInstance().uninstallPopupWindow(window); DecorationsHandler.getSharedInstance().uninstallPopupWindow(window);
} }
}
if (startHidden) { if (startHidden) {
((JComponent) contents).putClientProperty(DarkPopupMenuUI.KEY_MAKE_VISIBLE, true); ((JComponent) contents).putClientProperty(DarkPopupMenuUI.KEY_MAKE_VISIBLE, true);
window.setOpacity(0.0f); window.setOpacity(0.0f);

Loading…
Cancel
Save