Moving some other graphic related parts into GUI initialization

This commit is contained in:
Cristian Maglie 2016-11-07 16:43:34 +01:00
parent cf54cce660
commit b73bc92a5c
1 changed files with 16 additions and 16 deletions

View File

@ -202,7 +202,23 @@ public class Base {
SplashScreenHelper splash;
if (parser.isGuiMode()) {
// Setup all notification widgets
splash = new SplashScreenHelper(SplashScreen.getSplashScreen());
BaseNoGui.notifier = new GUIUserNotifier(this);
// Setup the theme coloring fun
Theme.init();
System.setProperty("swing.aatext", PreferencesData.get("editor.antialias", "true"));
// Set the look and feel before opening the window
try {
BaseNoGui.getPlatform().setLookAndFeel();
} catch (Exception e) {
// ignore
}
// Use native popups so they don't look so crappy on osx
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
} else {
splash = new SplashScreenHelper(null);
}
@ -211,29 +227,13 @@ public class Base {
BaseNoGui.initVersion();
// Use native popups so they don't look so crappy on osx
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
// Don't put anything above this line that might make GUI,
// because the platform has to be inited properly first.
// setup the theme coloring fun
Theme.init();
System.setProperty("swing.aatext", PreferencesData.get("editor.antialias", "true"));
// Set the look and feel before opening the window
try {
BaseNoGui.getPlatform().setLookAndFeel();
} catch (Exception e) {
// ignore
}
// Create a location for untitled sketches
untitledFolder = FileUtils.createTempFolder("untitled" + new Random().nextInt(Integer.MAX_VALUE), ".tmp");
DeleteFilesOnShutdown.add(untitledFolder);
BaseNoGui.notifier = new GUIUserNotifier(this);
BaseNoGui.checkInstallationFolder();
// If no path is set, get the default sketchbook folder for this platform