summaryrefslogtreecommitdiff
path: root/platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java')
-rw-r--r--platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java b/platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java
index 04c38a6cc295..1b9190f6a740 100644
--- a/platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java
+++ b/platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java
@@ -177,15 +177,19 @@ public abstract class WizardPopup extends AbstractPopup implements ActionListene
LOG.assertTrue (!isDisposed());
Rectangle targetBounds = new Rectangle(new Point(aScreenX, aScreenY), getContent().getPreferredSize());
- ScreenUtil.moveRectangleToFitTheScreen(targetBounds);
if (getParent() != null) {
final Rectangle parentBounds = getParent().getBounds();
parentBounds.x += STEP_X_PADDING;
parentBounds.width -= STEP_X_PADDING * 2;
+ ScreenUtil.moveToFit(targetBounds, ScreenUtil.getScreenRectangle(
+ parentBounds.x + parentBounds.width / 2,
+ parentBounds.y + parentBounds.height / 2), null);
if (parentBounds.intersects(targetBounds)) {
targetBounds.x = getParent().getBounds().x - targetBounds.width - STEP_X_PADDING;
}
+ } else {
+ ScreenUtil.moveToFit(targetBounds, ScreenUtil.getScreenRectangle(aScreenX, aScreenY), null);
}
if (getParent() == null) {