mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-13 10:29:35 +01:00
Moving some other graphic related parts into GUI initialization
This commit is contained in:
parent
cf54cce660
commit
b73bc92a5c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user