diff options
author | David Edmundson <davidedmundson@kde.org> | 2014-05-05 15:50:48 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-05 17:02:11 +0200 |
commit | 4b05f89608fa8a4070b1046bed123b2115a771f9 (patch) | |
tree | 87f80230e22acf5a642a0dbc800f00a9770ce127 /src/controls/Styles/Desktop/CheckBoxStyle.qml | |
parent | 0d394a375f2b01725e7cf3658c8237393086e39e (diff) | |
download | qtquickcontrols-4b05f89608fa8a4070b1046bed123b2115a771f9.tar.gz |
Don't include the indicatorWidth twice on Checkable Buttons
QQuickStyleItem calculates the full size from the content size using the
QStyle's sizeFromContent
The QStyle will add the indicator to the contentSize. We should not
include the indicator in the contents otherwise the indicator gets added
twice.
4px of margins is added to match QRadioButton::sizeHint
Change-Id: I791b0a8585843e66a6d8af456d95652496fe94d4
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/controls/Styles/Desktop/CheckBoxStyle.qml')
-rw-r--r-- | src/controls/Styles/Desktop/CheckBoxStyle.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controls/Styles/Desktop/CheckBoxStyle.qml b/src/controls/Styles/Desktop/CheckBoxStyle.qml index 6bb33663..9872a014 100644 --- a/src/controls/Styles/Desktop/CheckBoxStyle.qml +++ b/src/controls/Styles/Desktop/CheckBoxStyle.qml @@ -59,7 +59,7 @@ Style { hints: control.styleHints properties: {"partiallyChecked": (control.checkedState === Qt.PartiallyChecked) } contentHeight: textitem.implicitHeight - contentWidth: textitem.implicitWidth + indicatorWidth + contentWidth: textitem.implicitWidth + 4 property int indicatorWidth: pixelMetric("indicatorwidth") + (macStyle ? 2 : 4) property bool macStyle: (style === "mac") |