IDEA-248037 Disable button disappears after resizing plugin settings window
authorAlexander Lobas <Alexander.Lobas@jetbrains.com>
Wed, 12 Aug 2020 18:50:57 +0000 (21:50 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Wed, 12 Aug 2020 18:53:10 +0000 (18:53 +0000)
GitOrigin-RevId: d9dd64319469e98fccbe3cf6d67a6ac804e9ebd5

platform/platform-impl/src/com/intellij/ide/plugins/newui/PluginDetailsPageComponent.java

index d072e482a34a3a1ff794f9303763e50b17bd8f30..b11adba7d36220a449db92e1fcb329d7540f9522 100644 (file)
@@ -187,6 +187,15 @@ public class PluginDetailsPageComponent extends MultiPanel {
         Dimension size = myBaselineComponent.getPreferredSize();
         return myBaselineComponent.getBaseline(size.width, size.height);
       }
+
+      @Override
+      public Dimension getPreferredSize() {
+        Dimension size = super.getPreferredSize();
+        if (size.height == 0) {
+          size.height = getMinimumSize().height;
+        }
+        return size;
+      }
     };
 
     ErrorComponent.convertToLabel(editorPane);
@@ -197,6 +206,10 @@ public class PluginDetailsPageComponent extends MultiPanel {
       editorPane.setFont(font.deriveFont(Font.BOLD, 25));
     }
 
+    editorPane.setText("<html><span>Foo</span></html>");
+    editorPane.setMinimumSize(editorPane.getPreferredSize());
+    editorPane.setText(null);
+
     return editorPane;
   }