summaryrefslogtreecommitdiff
path: root/src/controls/Styles/Base/RadioButtonStyle.qml
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2014-01-31 14:36:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-14 15:11:31 +0100
commite25e72f05b13718d56365c8ed14da58209adaaa5 (patch)
tree5299d2d02fc2b86aeb88fad71bbd5df8296f9596 /src/controls/Styles/Base/RadioButtonStyle.qml
parent4b11a2f2ab47683785cea0c3648f403c56dfa255 (diff)
downloadqtquickcontrols-e25e72f05b13718d56365c8ed14da58209adaaa5.tar.gz
Set baselineOffset on Styles/Base correctly
Will currently fix these styles: ButtonStyle CheckBoxStyle ComboBoxStyle RadioButtonStyle TextFieldStyle and SpinBox style are not possible to fix yet, since they require TextInput to be fixed (its baselineOffset seems to always be 0) Change-Id: I78f90ed70ab1b6cc99c5e773e9aecd9b0342d7ae Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/Styles/Base/RadioButtonStyle.qml')
-rw-r--r--src/controls/Styles/Base/RadioButtonStyle.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/controls/Styles/Base/RadioButtonStyle.qml b/src/controls/Styles/Base/RadioButtonStyle.qml
index 78f423ac..74fc0558 100644
--- a/src/controls/Styles/Base/RadioButtonStyle.qml
+++ b/src/controls/Styles/Base/RadioButtonStyle.qml
@@ -87,6 +87,7 @@ Style {
property Component label: Item {
implicitWidth: text.implicitWidth + 2
implicitHeight: text.implicitHeight
+ baselineOffset: text.y + text.baselineOffset
Rectangle {
anchors.fill: text
anchors.margins: -1
@@ -146,6 +147,7 @@ Style {
property Component panel: Item {
implicitWidth: Math.max(backgroundLoader.implicitWidth, row.implicitWidth + padding.left + padding.right)
implicitHeight: Math.max(backgroundLoader.implicitHeight, labelLoader.implicitHeight + padding.top + padding.bottom,indicatorLoader.implicitHeight + padding.top + padding.bottom)
+ baselineOffset: labelLoader.item ? padding.top + labelLoader.item.baselineOffset : 0
Loader {
id:backgroundLoader