diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java b/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java index 5a9396da64..586047f5ae 100644 --- a/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java @@ -398,9 +398,11 @@ public final class GUICoreUtils { Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); screen.setSize(screen.getSize().width, screen.height - HEIGHT_GAP); + int showOnScreenX = Math.min(screen.width, parentComponent.getLocationOnScreen().x + parentComponent.getWidth()); + // peter:调整X的高度. - if (point.x + size.width > screen.width && size.width < screen.width) { - x += (screen.width - point.x - size.width); + if (point.x + size.width > showOnScreenX && size.width < showOnScreenX) { + x += (showOnScreenX - point.x - size.width); } // peter:调整y高度.