Fix groupboxes for desktop components on mac

The logic was a bit odd as it would check if the groupbox had a
font set and then override it anyway. Since we anyway want the
fallback to be used for components we just make sure that the fallback
is to use the same code path.

Change-Id: Ic5071b43cda76e2bb7356a6f71cc8458c4e8bf27
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Jens Bache-Wiig 2012-11-01 12:47:40 +01:00 committed by The Qt Project
parent 5b21b6a7f0
commit 8c15be7bb2

View File

@ -5399,7 +5399,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
QStyleOptionGroupBox groupBox(*gb);
groupBox.state |= QStyle::State_Mini; // Force mini-sized checkbox to go with small-sized label
bool didModifySubControls = false;
if ((widget && !widget->testAttribute(Qt::WA_SetFont))
if ((!widget || !widget->testAttribute(Qt::WA_SetFont))
&& QApplication::desktopSettingsAware()) {
groupBox.subControls = groupBox.subControls & ~SC_GroupBoxLabel;
didModifySubControls = true;