diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2014-02-20 19:23:44 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-26 11:05:36 +0100 |
commit | 41f44e224695789974e2c92db95810e19e6fab49 (patch) | |
tree | 9e31bbf8b04aa7c90d32a36a25d7d57de7ba16d7 /src/controls/Styles/Base/TextFieldStyle.qml | |
parent | 9bdbff5a14f340b6b12f1fcd84608d17bdc67d70 (diff) | |
download | qtquickcontrols-41f44e224695789974e2c92db95810e19e6fab49.tar.gz |
Set baselineOffset on Styles/Base correctly
Fixes the baselineOffset for TextField and SpinBox
Task-number: QTBUG-36529
Change-Id: I697d4c8bc2ee61929eabb54a6ec6520311a4e3e2
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/Styles/Base/TextFieldStyle.qml')
-rw-r--r-- | src/controls/Styles/Base/TextFieldStyle.qml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml index 4713130f..1b732cee 100644 --- a/src/controls/Styles/Base/TextFieldStyle.qml +++ b/src/controls/Styles/Base/TextFieldStyle.qml @@ -116,6 +116,7 @@ Style { property Component background: Item { implicitWidth: Math.round(control.__contentHeight * 8) implicitHeight: Math.max(25, Math.round(control.__contentHeight * 1.2)) + baselineOffset: control.__baselineOffset Rectangle { anchors.fill: parent anchors.bottomMargin: -1 @@ -150,6 +151,7 @@ Style { implicitWidth: backgroundLoader.implicitWidth ? backgroundLoader.implicitWidth : 100 implicitHeight: backgroundLoader.implicitHeight ? backgroundLoader.implicitHeight : 20 + baselineOffset: backgroundLoader.item ? padding.top + backgroundLoader.item.baselineOffset : 0 property color placeholderTextColor: style.placeholderTextColor property font font: style.font |