mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show value popup at the bottom if it does not fit at the top
This commit is contained in:
@@ -117,7 +117,9 @@ public class DebuggerUIUtil {
|
||||
|
||||
JBPopup popup = createValuePopup(project, textArea, callback);
|
||||
if (editor == null) {
|
||||
popup.show(new RelativePoint(event.getComponent(), new Point(event.getX() - size.width, event.getY() - size.height)));
|
||||
int y = (event.getYOnScreen() - size.height < 0) ? event.getY() : event.getY() - size.height;
|
||||
Point point = new Point(event.getX() - size.width, y);
|
||||
popup.show(new RelativePoint(event.getComponent(), point));
|
||||
}
|
||||
else {
|
||||
popup.showInBestPositionFor(editor);
|
||||
|
||||
Reference in New Issue
Block a user