QWindowsVistaStyle: fix frame rendering

A regression caused by 79a389 - it should only draw a styled frame for
text input widgets.

Task-number: QTBUG-28876
Change-Id: I5cda920b7db55f35e0ab6cee460c0e27951d29b9
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
J-P Nurmi 2013-01-07 13:18:59 +01:00 committed by The Qt Project
parent 2c241d0604
commit 25ae390461

View File

@ -502,6 +502,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
} }
break; break;
case PE_Frame: { case PE_Frame: {
if (QStyleHelper::isInstanceOf(option->styleObject, QAccessible::EditableText)) {
painter->save(); painter->save();
int stateId = ETS_NORMAL; int stateId = ETS_NORMAL;
if (!(state & State_Enabled)) if (!(state & State_Enabled))
@ -525,6 +526,9 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
} }
d->drawBackground(theme); d->drawBackground(theme);
painter->restore(); painter->restore();
} else {
QWindowsXPStyle::drawPrimitive(element, option, painter, widget);
}
} }
break; break;