popup with border positioning fix

This commit is contained in:
Kirill Kalishev
2011-03-10 20:47:53 +03:00
parent 654114ecf1
commit 3e935e05d5
@@ -1093,7 +1093,11 @@ public class AbstractPopup implements JBPopup {
myForcedLocation = screenPoint;
}
else {
moveTo(myContent, screenPoint, myLocateByContent ? myHeaderPanel.getPreferredSize() : null);
Insets insets = myPopupBorder.getBorderInsets(myContent);
if (insets == null) {
insets = new Insets(0, 0, 0, 0);
}
moveTo(myContent, new Point(screenPoint.x - insets.left, screenPoint.y - insets.top), myLocateByContent ? myHeaderPanel.getPreferredSize() : null);
}
}