Author: jflesch
Date: 2007-07-29 18:17:38 +0000 (Sun, 29 Jul 2007)
New Revision: 14428

Modified:
   trunk/apps/Thaw/src/thaw/core/Core.java
Log:
Make the look'n'feel GTK works as best as possible

Modified: trunk/apps/Thaw/src/thaw/core/Core.java
===================================================================
--- trunk/apps/Thaw/src/thaw/core/Core.java     2007-07-29 17:44:55 UTC (rev 
14427)
+++ trunk/apps/Thaw/src/thaw/core/Core.java     2007-07-29 18:17:38 UTC (rev 
14428)
@@ -145,6 +145,8 @@

                mainWindow.setVisible(true);

+               reallySetTheme(lookAndFeel);
+
                return true;
        }

@@ -380,15 +382,7 @@
        }


-       public void setTheme(String theme) {
-               if (theme == null) {
-                       if (getConfig() != null)
-                               theme = getConfig().getValue("lookAndFeel");
-
-                       if (theme == null)
-                               theme = 
UIManager.getSystemLookAndFeelClassName();
-               }
-
+       private void reallySetTheme(String theme) {
                if (theme == null)
                        return;

@@ -409,9 +403,24 @@
                }
        }

+       public void setTheme(String theme) {
+               if (theme == null) {
+                       if (getConfig() != null)
+                               theme = getConfig().getValue("lookAndFeel");

+                       if (theme == null)
+                               theme = 
UIManager.getSystemLookAndFeelClassName();
+               }

+               lookAndFeel = theme;

+               if (mainWindow.getMainFrame().isVisible())
+                       reallySetTheme(lookAndFeel);
+       }
+
+
+
+
        /**
         * This method sets the look and feel specified with setLookAndFeel().
         * If none was specified, the System Look and Feel is set.


Reply via email to