changeset 1790:da3f3de73066 8.0-b59

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/8.0/MASTER/rt
author leifs
date Tue, 02 Oct 2012 12:10:26 -0700
parents eac2df24a6c0 07c0a2cbf8f3
children 3c29ef369f0c c8deba0d0fb6 c15a91781139
files
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/Utils.java	Tue Oct 02 09:02:40 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/Utils.java	Tue Oct 02 12:10:26 2012 -0700
@@ -31,6 +31,7 @@
 
 import static javafx.scene.control.OverrunStyle.*;
 import javafx.collections.ObservableList;
+import javafx.geometry.Bounds;
 import javafx.geometry.HPos;
 import javafx.geometry.Point2D;
 import javafx.geometry.VPos;
@@ -76,7 +77,8 @@
         // The -2 is a fudge to make sure the result more often matches
         // what we get from using computeTextWidth instead. It's not yet
         // clear what causes the small discrepancies.
-        Point2D endPoint = new Point2D(width - 2, helper.getLayoutBounds().getHeight() / 2);
+        Bounds bounds = helper.getLayoutBounds();
+        Point2D endPoint = new Point2D(width - 2, bounds.getMinY() + bounds.getHeight() / 2);
         return helper.impl_hitTestChar(endPoint).getCharIndex();
     }