From 831f34ccf7eaa543ae6c04550a2f81a27aae21e7 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Fri, 10 Jul 2020 12:42:34 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-34020=20=E3=80=90=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E3=80=91=E9=9D=9E=E7=AE=80=E4=B8=AD=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8-=E7=95=8C=E9=9D=A2=E5=8F=B3=E4=BE=A7=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E9=80=89=E6=8B=A9=E8=B6=85=E9=93=BE=E6=8E=A5=E6=88=96?= =?UTF-8?q?=E6=82=AC=E6=B5=AE=E5=85=83=E7=B4=A0=E5=90=8E=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/utils/gui/GUICoreUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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高度.