File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
arduino-core/src/processing/app/macosx Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,10 @@ static public void main(String args[]) throws Exception {
133133 System .setProperty ("java.net.useSystemProxies" , "true" );
134134
135135 if (OSUtils .isMacOS ()) {
136+ System .setProperty ("apple.laf.useScreenMenuBar" ,
137+ String .valueOf (!System .getProperty ("os.version" ).startsWith ("10.13" )
138+ || com .apple .eawt .Application .getApplication ().isAboutMenuItemPresent ()));
139+
136140 ThinkDifferent .init ();
137141 }
138142
Original file line number Diff line number Diff line change @@ -619,7 +619,7 @@ public void actionPerformed(ActionEvent e) {
619619 fileMenu .add (item );
620620
621621 // macosx already has its own preferences and quit menu
622- if (!OSUtils .isMacOS ()) {
622+ if (!OSUtils .isMacOS () || System . getProperty ( "apple.laf.useScreenMenuBar" ) == "false" ) {
623623 fileMenu .addSeparator ();
624624
625625 item = newJMenuItem (tr ("Preferences" ), ',' );
@@ -1252,7 +1252,7 @@ public void actionPerformed(ActionEvent e) {
12521252 menu .add (item );
12531253
12541254 // macosx already has its own about menu
1255- if (!OSUtils .isMacOS ()) {
1255+ if (!OSUtils .isMacOS () || System . getProperty ( "apple.laf.useScreenMenuBar" ) == "false" ) {
12561256 menu .addSeparator ();
12571257 item = new JMenuItem (tr ("About Arduino" ));
12581258 item .addActionListener (new ActionListener () {
@@ -1812,7 +1812,7 @@ protected boolean checkModified() {
18121812 String prompt = I18n .format (tr ("Save changes to \" {0}\" ? " ),
18131813 sketch .getName ());
18141814
1815- if (!OSUtils .isMacOS ()) {
1815+ if (!OSUtils .isMacOS () || System . getProperty ( "apple.laf.useScreenMenuBar" ) == "false" ) {
18161816 int result =
18171817 JOptionPane .showConfirmDialog (this , prompt , tr ("Close" ),
18181818 JOptionPane .YES_NO_CANCEL_OPTION ,
Original file line number Diff line number Diff line change @@ -62,9 +62,6 @@ public Platform() {
6262 @ Override
6363 public void init () throws Exception {
6464 super .init ();
65-
66- System .setProperty ("apple.laf.useScreenMenuBar" , "true" );
67-
6865 discoverRealOsArch ();
6966 }
7067
You can’t perform that action at this time.
0 commit comments