From 92084248076ff7bd9b5acd74dd12ee3521c47e63 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 25 May 2017 14:43:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=80=E9=83=A8=E5=8F=98=E9=87=8F=E4=B8=8D?= =?UTF-8?q?=E8=A1=8C..=E8=BF=98=E6=98=AF=E6=94=B9=E5=9B=9E=E5=8E=BB?= =?UTF-8?q?=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/autocomplete/AutoCompletePopupWindow.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/autocomplete/AutoCompletePopupWindow.java b/designer_base/src/com/fr/design/gui/autocomplete/AutoCompletePopupWindow.java index 4dced3a83..ec303ee44 100644 --- a/designer_base/src/com/fr/design/gui/autocomplete/AutoCompletePopupWindow.java +++ b/designer_base/src/com/fr/design/gui/autocomplete/AutoCompletePopupWindow.java @@ -387,16 +387,15 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener, // Try to position to the right first (LTR) int x; - int dis = 5; if (ac.getTextComponentOrientation().isLeftToRight()) { - x = getX() + getWidth() + dis; + x = getX() + getWidth() + 5; if (x + descWindow.getWidth() > screenBounds.x + screenBounds.width) { // doesn't fit - x = getX() - dis - descWindow.getWidth(); + x = getX() - 5 - descWindow.getWidth(); } } else { // RTL - x = getX() - dis - descWindow.getWidth(); + x = getX() - 5 - descWindow.getWidth(); if (x < screenBounds.x) { // Doesn't fit - x = getX() + getWidth() + dis; + x = getX() + getWidth() + 5; } }