mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
popup location fix for OS with our own window border
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user