mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
IJPL-171475 Fix the fit-to-screen logic in AbstractPopup
The existing logic didn't take coordinates into account. A popup may be smaller than the screen, but shifted so that it doesn't fit anyway. (cherry picked from commit 945d7a60730508eb3d68f257c95d3833d68846d1) IJ-CR-149457 GitOrigin-RevId: c2874c7d61f524c183d8f1451408d64e0d8db356
This commit is contained in:
committed by
intellij-monorepo-bot
parent
655d3cec0d
commit
2f41585647
@@ -1370,7 +1370,12 @@ public class AbstractPopup implements JBPopup, ScreenAreaConsumer, AlignedPopup
|
||||
|
||||
PopupLocationTracker.register(this);
|
||||
|
||||
if (bounds.width > screen.width || bounds.height > screen.height) {
|
||||
if (
|
||||
bounds.x < screen.x ||
|
||||
bounds.y < screen.y ||
|
||||
bounds.x + bounds.width > screen.x + screen.width ||
|
||||
bounds.y + bounds.height > screen.y + screen.height
|
||||
) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Bounds won't fit into the screen, adjusting");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user