From 068c3d64235f2dd6292f79d711a75f2b3ec306c9 Mon Sep 17 00:00:00 2001 From: Kirill Kalishev Date: Mon, 14 Mar 2011 17:44:53 +0300 Subject: [PATCH] popup location fix for OS with our own window border --- .../src/com/intellij/ui/popup/AbstractPopup.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java b/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java index 5e76d9d440d6..cd1c17c4dfff 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java @@ -624,6 +624,12 @@ public class AbstractPopup implements JBPopup { } Rectangle targetBounds = new Rectangle(xy, myContent.getPreferredSize()); + Insets insets = myPopupBorder.getBorderInsets(myContent); + if (insets != null) { + targetBounds.x += insets.left; + targetBounds.y += insets.top; + } + Rectangle original = new Rectangle(targetBounds); if (myLocateWithinScreen) { ScreenUtil.moveRectangleToFitTheScreen(targetBounds);