OpenJDK / openjfx / 8 / master / rt
changeset 1759:c5c10c94fa3c
branch merge
author | David Grieve<david.grieve@oracle.com> |
---|---|
date | Thu, 13 Sep 2012 16:17:13 -0400 |
parents | 26cfaf711edb 02231f1e3171 |
children | 6b6962fcc056 |
files | |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextFieldSkin.java Tue Sep 11 20:39:23 2012 -0400 +++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextFieldSkin.java Thu Sep 13 16:17:13 2012 -0400 @@ -530,14 +530,18 @@ case RIGHT: textTranslateX.set(textRight.get() - textNode.getLayoutBounds().getWidth() - caretWidth / 2 - 5); - promptNode.setLayoutX(textRight.get() - promptNode.getLayoutBounds().getWidth() - - caretWidth / 2 - 5); + if (usePromptText.get()) { + promptNode.setLayoutX(textRight.get() - promptNode.getLayoutBounds().getWidth() - + caretWidth / 2 - 5); + } break; case LEFT: default: textTranslateX.set(caretWidth / 2); - promptNode.layoutXProperty().set(caretWidth / 2); + if (usePromptText.get()) { + promptNode.layoutXProperty().set(caretWidth / 2); + } } }