summaryrefslogtreecommitdiff
path: root/src/controls/Styles/Desktop/CheckBoxStyle.qml
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2014-05-05 15:50:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-05 17:02:11 +0200
commit4b05f89608fa8a4070b1046bed123b2115a771f9 (patch)
tree87f80230e22acf5a642a0dbc800f00a9770ce127 /src/controls/Styles/Desktop/CheckBoxStyle.qml
parent0d394a375f2b01725e7cf3658c8237393086e39e (diff)
downloadqtquickcontrols-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.qml2
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")