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; } }