diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-10-31 00:53:21 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-11-02 18:15:50 +0000 |
commit | 92aa5333846081b294fc332e64f7e49b329edf92 (patch) | |
tree | ceb86ff0c863333c010cb4dc4405e76bca5b150f /src/imports/controls/TextField.qml | |
parent | cdda0b9492920424d8ffb1af1f3e9dfe0f031b44 (diff) |
Editors: hide placeholder text when h-centered & focused
The same was done to QLineEdit in qtbase commit a2666d3. A quote from
the commit message:
A blinking cursor in the middle over horizontally centered
placeholder text looks bad. Thus, horizontally centered content
is now considered as an exception and the placeholder text is
hidden when the line edit is focused.
Change-Id: I5f86482c425fe878ecf6b4046dd835a0464d2150
Task-number: QTBUG-49147
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/TextField.qml')
-rw-r--r-- | src/imports/controls/TextField.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/controls/TextField.qml b/src/imports/controls/TextField.qml index 4e3c15c6..ce5534e4 100644 --- a/src/imports/controls/TextField.qml +++ b/src/imports/controls/TextField.qml @@ -65,7 +65,7 @@ T.TextField { color: control.Theme.disabledColor horizontalAlignment: control.horizontalAlignment verticalAlignment: control.verticalAlignment - visible: !control.displayText + visible: !control.displayText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter) elide: Text.ElideRight } |