1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-02 00:15:02 -04:00

use platform-independent laf for standalone jar deployment

This commit is contained in:
Reinhard Pointner 2016-06-05 14:05:44 +08:00
parent e64cd633a5
commit 642d47c2d2
2 changed files with 6 additions and 2 deletions

View File

@ -176,9 +176,9 @@ public class Main {
}
private static void startUserInterface(ArgumentBean args) {
// use native LaF an all platforms
// use native LaF an all platforms (use platform-independent laf for standalone jar deployment)
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
UIManager.setLookAndFeel(isExecutableJar() ? "javax.swing.plaf.nimbus.NimbusLookAndFeel" : UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
debug.log(Level.SEVERE, e.getMessage(), e);
}

View File

@ -82,6 +82,10 @@ public final class Settings {
return System.getProperty("application.deployment", "jar");
}
public static boolean isExecutableJar() {
return isApplicationDeployment("jar");
}
public static boolean isAppStore() {
return isApplicationDeployment("mas", "usc");
}