Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions app/src/processing/app/Base.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,6 @@ public Base(String[] args) throws Exception {
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 {
Expand Down
23 changes: 23 additions & 0 deletions app/src/processing/app/Theme.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
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;
Expand Down Expand Up @@ -344,6 +345,28 @@ static protected void init() {

// 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() {
Expand Down