diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-08-02 19:55:17 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-03 14:09:02 +0200 |
commit | 117c0dc47a1a255987dda498f9727672c9106b48 (patch) | |
tree | b3bad97e1180af192f0c5cb6dc92f1cf606403fc /src/controls/TextField.qml | |
parent | 7a9e41ac5014454dba9df5285777e91846b9b3ea (diff) | |
download | qtquickcontrols-117c0dc47a1a255987dda498f9727672c9106b48.tar.gz |
Be bit more clever with when we clip.
Clipping breaks every optimization the scene graph can do, so
we should avoid it when possible.
Change-Id: I774bfedb19e0fa9f48c35a8db84a81f5528a4ef8
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/controls/TextField.qml')
-rw-r--r-- | src/controls/TextField.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml index e9ea9bf9..1648ac57 100644 --- a/src/controls/TextField.qml +++ b/src/controls/TextField.qml @@ -559,7 +559,7 @@ Control { verticalAlignment: textInput.verticalAlignment opacity: !textInput.text.length ? 1 : 0 color: __panel ? __panel.placeholderTextColor : "darkgray" - clip: true + clip: contentWidth > width; elide: Text.ElideRight renderType: Text.NativeRendering Behavior on opacity { NumberAnimation { duration: 90 } } @@ -582,7 +582,8 @@ Control { verticalAlignment: Text.AlignVCenter color: __panel ? __panel.textColor : "darkgray" - clip: true + clip: contentWidth > width + renderType: Text.NativeRendering onAccepted: textfield.accepted() |