From b03f63d27aaebe87963d905a75508e9543055289 Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Fri, 25 Apr 2014 11:59:40 +0400 Subject: [PATCH] fixed PY-12786 Python Interpreters: extra space in configuration popup from project creation dialog --- .../src/com/jetbrains/python/sdk/PythonSdkDetailsStep.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/src/com/jetbrains/python/sdk/PythonSdkDetailsStep.java b/python/src/com/jetbrains/python/sdk/PythonSdkDetailsStep.java index d643cc42b56c..f9cfa8ddeabf 100644 --- a/python/src/com/jetbrains/python/sdk/PythonSdkDetailsStep.java +++ b/python/src/com/jetbrains/python/sdk/PythonSdkDetailsStep.java @@ -59,14 +59,15 @@ public class PythonSdkDetailsStep extends BaseListPopupStep { public static void show(final Project project, final Sdk[] existingSdks, - DialogWrapper moreDialog, + @Nullable final DialogWrapper moreDialog, JComponent ownerComponent, final Point popupPoint, final NullableConsumer callback) { final ListPopupStep sdkHomesStep = new PythonSdkDetailsStep(project, moreDialog, ownerComponent, existingSdks, callback); final ListPopup popup = JBPopupFactory.getInstance().createListPopup(sdkHomesStep); Dimension size = new JLabel(VIRTUALENV, EmptyIcon.ICON_16, SwingConstants.LEFT).getMinimumSize(); - final int height = size.height * 5 + 10; + int componentNum = moreDialog == null ? 4 : 5; + int height = size.height * componentNum + 2*componentNum; popup.setSize(new Dimension(size.width, height)); popup.setMinimumSize(new Dimension(size.width, height)); popup.showInScreenCoordinates(ownerComponent, popupPoint);