changeset 7723:0bec451a41d1

RT-37092: When I use 'Arial' or 'Hiragino Sans GB' font in a TextArea, the arrow 'Down' is not working well Reviewed-by: fheidric
author leifs
date Tue, 19 Aug 2014 11:50:42 -0700
parents b96a3083c5ac
children 1c84e8f0fda4
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/Utils.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/Utils.java	Tue Aug 19 20:46:27 2014 +0300
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/Utils.java	Tue Aug 19 11:50:42 2014 -0700
@@ -109,7 +109,8 @@
         } else {
             layout.setBoundsType(0);
         }
-        return layout.getBounds().getHeight();
+        // RT-37092: Use the line bounds specifically, to include font leading.
+        return layout.getLines()[0].getBounds().getHeight();
     }
 
     static double computeTextWidth(Font font, String text, double wrappingWidth) {