mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-26 20:54:22 +01:00
Merge 96e412284f862257259aa6e9437f45d2991b98a8 into 3278173ef810935e07808deed58783c1bc7ca4cf
This commit is contained in:
commit
b0451f0990
@ -244,13 +244,6 @@ public class Base {
|
|||||||
Theme.init();
|
Theme.init();
|
||||||
System.setProperty("swing.aatext", PreferencesData.get("editor.antialias", "true"));
|
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
|
// Use native popups so they don't look so crappy on osx
|
||||||
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
|
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
|
@ -57,6 +57,7 @@ import java.util.TreeMap;
|
|||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipFile;
|
import java.util.zip.ZipFile;
|
||||||
|
|
||||||
|
import javax.swing.UIManager;
|
||||||
import javax.swing.text.StyleContext;
|
import javax.swing.text.StyleContext;
|
||||||
|
|
||||||
import org.apache.batik.transcoder.Transcoder;
|
import org.apache.batik.transcoder.Transcoder;
|
||||||
@ -344,6 +345,28 @@ public class Theme {
|
|||||||
|
|
||||||
// clone the hash table
|
// clone the hash table
|
||||||
defaults = new PreferencesMap(table);
|
defaults = new PreferencesMap(table);
|
||||||
|
|
||||||
|
// Set the look and feel before opening the window
|
||||||
|
try {
|
||||||
|
String laf = defaults.get("ui.laf");
|
||||||
|
|
||||||
|
if(laf != null && ! laf.trim().isEmpty()) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
UIManager.setLookAndFeel(laf);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
BaseNoGui.getPlatform().setLookAndFeel();
|
||||||
|
}
|
||||||
|
|
||||||
|
}else {
|
||||||
|
BaseNoGui.getPlatform().setLookAndFeel();
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static private ZippedTheme openZipTheme() {
|
static private ZippedTheme openZipTheme() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user