From 195cd51f7d1d853220c16d043f1dfabd852de98b Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Mon, 28 Oct 2013 09:21:33 +0100 Subject: Fix QSpinBox size calculation problem with empty stylesheets Task-number: QTBUG-34305 Change-Id: I3e89dc66446e9f5e9e1810be367830b9df98ab0b Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qstylesheetstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/styles') diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 417e092e11..ab98dfbdcf 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -4821,7 +4821,7 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op QSize defaultUpSize = defaultSize(w, subRule.size(), spinbox->rect, PseudoElement_SpinBoxUpButton); sz += QSize(defaultUpSize.width(), 0); } - if (rule.hasBox() || !rule.hasNativeBorder()) + if (rule.hasBox() || rule.hasBorder() || !rule.hasNativeBorder()) sz = rule.boxSize(sz); return sz; } -- cgit v1.2.3