ui: respect HiDPI displays in "Available Packages" dialog
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Thu, 5 Nov 2015 13:53:36 +0000 (16:53 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Thu, 5 Nov 2015 13:53:57 +0000 (16:53 +0300)
platform/lang-impl/src/com/intellij/webcore/packaging/ManagePackagesDialog.form
platform/lang-impl/src/com/intellij/webcore/packaging/ManagePackagesDialog.java

index 9337eed33403849ae28529969454c2458b1e4c14..4f42e77828fb8c8b4ac80321518fca27341ab366 100644 (file)
@@ -5,9 +5,7 @@
     <constraints>
       <xy x="49" y="40" width="451" height="540"/>
     </constraints>
-    <properties>
-      <preferredSize width="900" height="700"/>
-    </properties>
+    <properties/>
     <border type="none"/>
     <children>
       <grid id="64782" binding="myFilter" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
index f88b4aca83922bd57a8549fc6c69d8888aaee4ba..f5be735b8aaba8393f4e75f2b595ad9e971d6bd2 100644 (file)
@@ -31,6 +31,7 @@ import com.intellij.ui.components.JBList;
 import com.intellij.util.CatchingConsumer;
 import com.intellij.util.Function;
 import com.intellij.util.ObjectUtils;
+import com.intellij.util.ui.JBUI;
 import com.intellij.util.ui.PlatformColors;
 import com.intellij.util.ui.UIUtil;
 import com.intellij.util.ui.update.UiNotifyConnector;
@@ -136,10 +137,10 @@ public class ManagePackagesDialog extends DialogWrapper {
       .disableRemoveAction()
       .addExtraAction(reloadButton)
       .createPanel();
-    packagesPanel.setPreferredSize(new Dimension(400, -1));
-    packagesPanel.setMinimumSize(new Dimension(100, -1));
+    packagesPanel.setPreferredSize(new Dimension(JBUI.scale(400), -1));
+    packagesPanel.setMinimumSize(new Dimension(JBUI.scale(100), -1));
     myPackages.setFixedCellWidth(0);
-    myPackages.setFixedCellHeight(22);
+    myPackages.setFixedCellHeight(JBUI.scale(22));
     myPackages.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     mySplitPane.setLeftComponent(packagesPanel);
 
@@ -187,6 +188,7 @@ public class ManagePackagesDialog extends DialogWrapper {
     else {
       myInstallToUser.setVisible(false);
     }
+    myMainPanel.setPreferredSize(new Dimension(JBUI.scale(900), JBUI.scale(700)));
   }
 
   public void selectPackage(@NotNull InstalledPackage pkg) {