diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index cdac3059f..15a8a4ca9 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -244,13 +244,6 @@ public class Base { 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 { diff --git a/app/src/processing/app/Theme.java b/app/src/processing/app/Theme.java index d38875b35..17992338b 100644 --- a/app/src/processing/app/Theme.java +++ b/app/src/processing/app/Theme.java @@ -57,6 +57,7 @@ import java.util.TreeMap; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; +import javax.swing.UIManager; import javax.swing.text.StyleContext; import org.apache.batik.transcoder.Transcoder; @@ -344,6 +345,28 @@ public class Theme { // clone the hash 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() {