changeset 7932:31335892f770

RT-38408 RTL orientation, ChoiceBox popup is not aligned with the ChoiceBox.
author Martin Sladecek <martin.sladecek@oracle.com>
date Mon, 01 Sep 2014 11:03:44 +0200
parents 8fa9c7b3b5c8
children 481f8d61b1cd
files modules/graphics/src/main/java/com/sun/javafx/Utils.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/javafx/Utils.java	Mon Sep 01 09:42:26 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/javafx/Utils.java	Mon Sep 01 11:03:44 2014 +0200
@@ -457,6 +457,7 @@
             } else if (hpos == HPos.RIGHT) {
                 hpos = HPos.LEFT;
             }
+            dx *= -1;
         }
 
         double layoutX = positionX(parentBounds, anchorWidth, hpos) + dx;
@@ -465,7 +466,7 @@
         if (orientation == NodeOrientation.RIGHT_TO_LEFT && hpos == HPos.CENTER) {
             //TODO - testing for an instance of Stage seems wrong but works for menus
             if (scene.getWindow() instanceof Stage) {
-                layoutX = layoutX + parentBounds.getWidth() - anchorWidth + (dx * 2);
+                layoutX = layoutX + parentBounds.getWidth() - anchorWidth;
             } else {
                 layoutX = layoutX - parentBounds.getWidth() - anchorWidth;
             }