Skip to content

Commit

Permalink
Update Netbeans and make MacOSX use FlatLAF (#2616)
Browse files Browse the repository at this point in the history
  • Loading branch information
breiler authored Oct 5, 2024
1 parent e47ebaa commit 406e715
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion ugs-platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<properties>
<maven.build.timestamp.format>yyyy.MM.dd.HH.mm</maven.build.timestamp.format>
<netbeans.version>RELEASE180</netbeans.version>
<netbeans.version>RELEASE230</netbeans.version>
<ugs.app.title>Universal Gcode Sender ${project.version}</ugs.app.title>
<ugs.appbundle.name>Universal Gcode Sender</ugs.appbundle.name>
<parsedVersion.majorVersion>2</parsedVersion.majorVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ This file is part of Universal Gcode Sender (UGS).
*/
package com.willwinder.ugs.nbp.core.lifecycle;

import org.apache.commons.lang3.SystemUtils;
import org.openide.modules.ModuleInstall;
import org.openide.util.NbPreferences;

Expand All @@ -31,12 +30,7 @@ public class LookAndFeelInstaller extends ModuleInstall {

@Override
public void validate() {
if (SystemUtils.IS_OS_MAC_OSX) {
// FlatlLaf look and feel doesn't work on MacOSXs
setMacOSLaF();
} else {
setLaF();
}
setLaF();
}

private void setLaF() {
Expand All @@ -45,12 +39,4 @@ private void setLaF() {
prefs.put("laf", "com.formdev.flatlaf.FlatLightLaf");
}
}

private void setMacOSLaF() {
Preferences prefs = NbPreferences.root().node("laf");
String currentLaF = prefs.get("laf", "");
if (currentLaF.isBlank() || currentLaF.equals("com.formdev.flatlaf.FlatLightLaf")) {
prefs.put("laf", "com.apple.laf.AquaLookAndFeel");
}
}
}

0 comments on commit 406e715

Please sign in to comment.