do not change task description tool window background in darcula
authorLiana Bakradze <liana.bakradze@jetbrains.com>
Fri, 21 Aug 2015 11:30:08 +0000 (14:30 +0300)
committerLiana Bakradze <liana.bakradze@jetbrains.com>
Fri, 21 Aug 2015 11:30:08 +0000 (14:30 +0300)
python/educational/interactive-learning/src/com/jetbrains/edu/learning/ui/StudyToolWindow.java

index 841162e1dadfc02e30814d568d8bbbedbffb267f..9e44f6458b367376f3eb9fdddc726b48745be75c 100644 (file)
@@ -31,6 +31,7 @@ import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.ui.BrowserHyperlinkListener;
 import com.intellij.ui.components.JBScrollPane;
 import com.intellij.util.ui.JBUI;
+import com.intellij.util.ui.UIUtil;
 import com.jetbrains.edu.courseFormat.Task;
 import com.jetbrains.edu.courseFormat.TaskFile;
 import com.jetbrains.edu.learning.StudyUtils;
@@ -89,7 +90,9 @@ public class StudyToolWindow extends SimpleToolWindowPanel implements DataProvid
                       "font-size: " + font.getSize() + "pt; }";
     ((HTMLDocument)taskTextPane.getDocument()).getStyleSheet().addRule(bodyRule);
     taskTextPane.setEditable(false);
-    taskTextPane.setBackground(EditorColorsManager.getInstance().getGlobalScheme().getDefaultBackground());
+    if (!UIUtil.isUnderDarcula()) {
+      taskTextPane.setBackground(EditorColorsManager.getInstance().getGlobalScheme().getDefaultBackground());
+    }
     taskTextPane.setBorder(new EmptyBorder(15, 20, 0, 100));
     return taskTextPane;
   }