Fix EDU-698 Enlarge hint window default size
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Thu, 4 Aug 2016 11:35:38 +0000 (14:35 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Fri, 5 Aug 2016 08:19:56 +0000 (11:19 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyShowHintAction.java

index d1ee72a8585e104d89868c934fb15d244272b52f..306a05cf651e88a617a9352cb1ac7642e430e14f 100644 (file)
@@ -1,6 +1,5 @@
 package com.jetbrains.edu.learning.actions;
 
-import com.intellij.codeInsight.documentation.DocumentationManager;
 import com.intellij.ide.DataManager;
 import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.actionSystem.DataContext;
@@ -66,13 +65,14 @@ public class StudyShowHintAction extends StudyActionWithShortcut {
     EduUsagesCollector.hintShown();
 
     final StudyToolWindow hintComponent = new StudyHint(answerPlaceholder, project).getStudyToolWindow();
+    hintComponent.setPreferredSize(new Dimension(400, 150));
     showHintPopUp(project, studyState, editor, hintComponent);
   }
 
   private static void showHintPopUp(Project project, StudyState studyState, Editor editor, StudyToolWindow hintComponent) {
     final JBPopup popup =
       JBPopupFactory.getInstance().createComponentPopupBuilder(hintComponent, hintComponent)
-        .setDimensionServiceKey(project, DocumentationManager.JAVADOC_LOCATION_AND_SIZE, false)
+        .setDimensionServiceKey(project, "StudyHint", false)
         .setResizable(true)
         .setMovable(true)
         .setRequestFocus(true)