Fix QSpinBox size calculation problem with empty stylesheets

Task-number: QTBUG-34305

Change-Id: I3e89dc66446e9f5e9e1810be367830b9df98ab0b
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
Caroline Chao 2013-10-28 09:21:33 +01:00 committed by The Qt Project
parent ebf0524186
commit 195cd51f7d

View File

@ -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;
}