File tree Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -250,13 +250,6 @@ public Base(String[] args) throws Exception {
250
250
Theme .init ();
251
251
System .setProperty ("swing.aatext" , PreferencesData .get ("editor.antialias" , "true" ));
252
252
253
- // Set the look and feel before opening the window
254
- try {
255
- BaseNoGui .getPlatform ().setLookAndFeel ();
256
- } catch (Exception e ) {
257
- // ignore
258
- }
259
-
260
253
// Use native popups so they don't look so crappy on osx
261
254
JPopupMenu .setDefaultLightWeightPopupEnabled (false );
262
255
} else {
Original file line number Diff line number Diff line change 57
57
import java .util .zip .ZipEntry ;
58
58
import java .util .zip .ZipFile ;
59
59
60
+ import javax .swing .UIManager ;
60
61
import javax .swing .text .StyleContext ;
61
62
62
63
import org .apache .batik .transcoder .Transcoder ;
@@ -344,6 +345,28 @@ static protected void init() {
344
345
345
346
// clone the hash table
346
347
defaults = new PreferencesMap (table );
348
+
349
+ // Set the look and feel before opening the window
350
+ try {
351
+ String laf = defaults .get ("ui.laf" );
352
+
353
+ if (laf != null && ! laf .trim ().isEmpty ()) {
354
+
355
+ try {
356
+ UIManager .setLookAndFeel (laf );
357
+ } catch (Exception e ) {
358
+ e .printStackTrace ();
359
+ BaseNoGui .getPlatform ().setLookAndFeel ();
360
+ }
361
+
362
+ }else {
363
+ BaseNoGui .getPlatform ().setLookAndFeel ();
364
+ }
365
+
366
+ } catch (Exception e ) {
367
+ // ignore
368
+ }
369
+
347
370
}
348
371
349
372
static private ZippedTheme openZipTheme () {
You can’t perform that action at this time.
0 commit comments