popup location fix for OS with our own window border

This commit is contained in:
Kirill Kalishev
2011-03-14 17:44:53 +03:00
parent 71cacb9d1f
commit 068c3d6423
@@ -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);