IDEA-125557 Start From Scratch: on Darcula selecting as UI Theme in the Customize...
authorVassiliy <vassiliy.kudryashov@jetbrains.com>
Tue, 27 May 2014 09:09:46 +0000 (13:09 +0400)
committerVassiliy <vassiliy.kudryashov@jetbrains.com>
Tue, 27 May 2014 09:12:17 +0000 (13:12 +0400)
platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java

index 0c57604e21885807bf362b28f6de0fedfe594de7..e62499049da255006c43799b0c293839e66df4e4 100644 (file)
@@ -20,6 +20,7 @@ import com.intellij.ide.IdeBundle;
 import com.intellij.ide.ui.LafManager;
 import com.intellij.ide.ui.LafManagerListener;
 import com.intellij.ide.ui.UISettings;
+import com.intellij.ide.ui.laf.darcula.DarculaInstaller;
 import com.intellij.ide.ui.laf.darcula.DarculaLaf;
 import com.intellij.ide.ui.laf.darcula.DarculaLookAndFeelInfo;
 import com.intellij.idea.StartupUtil;
@@ -216,7 +217,16 @@ public final class LafManagerImpl extends LafManager implements ApplicationCompo
     if (myCurrentLaf != null) {
       final UIManager.LookAndFeelInfo laf = findLaf(myCurrentLaf.getClassName());
       if (laf != null) {
+        boolean needUninstall = UIUtil.isUnderDarcula();
         setCurrentLookAndFeel(laf); // setup default LAF or one specified by readExternal.
+        if (StartupUtil.getWizardLAF() != null) {
+          if (UIUtil.isUnderDarcula()) {
+            DarculaInstaller.install();
+          }
+          else if (needUninstall) {
+            DarculaInstaller.uninstall();
+          }
+        }
       }
     }