Browse Source

macOS system menu: respect -Dapple.laf.useScreenMenuBar=true

master
Konstantin Bulenkov 8 years ago
parent
commit
735c287e3f
  1. 4
      src/com/bulenkov/darcula/DarculaLaf.java
  2. 2
      src/com/bulenkov/darcula/darcula_mac.properties

4
src/com/bulenkov/darcula/DarculaLaf.java

@ -104,6 +104,10 @@ public final class DarculaLaf extends BasicLookAndFeel {
defaults.put("OptionPane.questionIcon", new IconUIResource(IconLoader.getIcon("/com/bulenkov/darcula/icons/option_pane_question.png")));
defaults.put("OptionPane.warningIcon", new IconUIResource(IconLoader.getIcon("/com/bulenkov/darcula/icons/option_pane_warning.png")));
defaults.put("OptionPane.errorIcon", new IconUIResource(IconLoader.getIcon("/com/bulenkov/darcula/icons/option_pane_error.png")));
if (SystemInfo.isMac && !"true".equalsIgnoreCase(System.getProperty("apple.laf.useScreenMenuBar", "false"))) {
defaults.put("MenuBarUI", "com.bulenkov.darcula.ui.DarculaMenuBarUI");
defaults.put("MenuUI", "javax.swing.plaf.basic.BasicMenuUI");
}
return defaults;
}
catch (Exception ignore) {

2
src/com/bulenkov/darcula/darcula_mac.properties

@ -18,8 +18,6 @@
darcula.selectionBackground=2F65CA
#Menu.arrowIcon=AllIcons.Mac.Tree_white_right_arrow
MenuBarUI=com.bulenkov.darcula.ui.DarculaMenuBarUI
MenuUI=javax.swing.plaf.basic.BasicMenuUI
MenuBar.border=com.bulenkov.darcula.ui.DarculaMenuBarBorder
FileChooserUI=javax.swing.plaf.metal.MetalFileChooserUI
Loading…
Cancel
Save