diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2014-10-15 17:10:09 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2014-10-28 10:02:27 +0100 |
commit | 437ab84c535538abc7adaa88b3101acdb98d2dde (patch) | |
tree | 38c7e2355f9b8f71f39d5c326b8b0f419e3be379 /src | |
parent | d916ffa113459574473b7e38c8e18e2e86dc3a0f (diff) | |
download | qtquickcontrols-437ab84c535538abc7adaa88b3101acdb98d2dde.tar.gz |
Android: fix GroupBoxStyle top margin
GroupBoxStyle was using checkmark indicator's height even when
the GroupBox was not checkable => too much spacing.
Change-Id: Ic68d8428471b8835cd92f44610a0d8b281bcc734
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/controls/Styles/Android/GroupBoxStyle.qml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/controls/Styles/Android/GroupBoxStyle.qml b/src/controls/Styles/Android/GroupBoxStyle.qml index b7346ea4..d8f1127b 100644 --- a/src/controls/Styles/Android/GroupBoxStyle.qml +++ b/src/controls/Styles/Android/GroupBoxStyle.qml @@ -53,7 +53,7 @@ GroupBoxStyle { readonly property var styleDef: AndroidStyle.styleDef.checkboxStyle readonly property real contentMargin: label.implicitHeight / 3 - readonly property real topMargin: indicator.height + readonly property real topMargin: control.checkable ? indicator.height : label.height Binding { target: root; property: "padding.top"; value: topMargin + contentMargin } Binding { target: root; property: "padding.left"; value: contentMargin } Binding { target: root; property: "padding.right"; value: contentMargin } @@ -95,14 +95,15 @@ GroupBoxStyle { DrawableLoader { id: indicator - visible: control.checkable + active: control.checkable checked: control.checked pressed: check.pressed focused: check.activeFocus window_focused: control.Window.active styleDef: AndroidStyle.styleDef.checkboxStyle.CompoundButton_button - anchors.verticalCenter: label.verticalCenter width: control.checkable ? item.implicitWidth : 0 + anchors.verticalCenter: parent.top + anchors.verticalCenterOffset: topMargin / 2 } LabelStyle { @@ -114,9 +115,10 @@ GroupBoxStyle { window_focused: control.Window.active styleDef: AndroidStyle.styleDef.checkboxStyle - anchors.top: parent.top anchors.left: indicator.right anchors.right: parent.right + anchors.verticalCenter: parent.top + anchors.verticalCenterOffset: topMargin / 2 } } } |