Windows: Fix QSpinBox background setting via stylesheet
authorMiikka Heikkinen <miikka.heikkinen@digia.com>
Mon, 12 Mar 2012 11:36:25 +0000 (13:36 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 13 Mar 2012 21:58:10 +0000 (22:58 +0100)
commit2d68c8ee8d28556eb40eb576d30b64fdac9b388d
tree3ef176af5bdc290329e50f45e5034e6c604b1e51
parente9fdfd746bc374b7b2cbccb875d36727b3946990
Windows: Fix QSpinBox background setting via stylesheet

When using stylesheets, palette mask for drawing the background
of line edit child of spinbox is already correctly resolved to style
options in QStyleSheetStyle::drawPrimitive(), so we cannot simply
ignore that mask and check the palette mask of the parent spinbox.

Fixed by using a union mask of the parent spinbox palette and the
palette supplied by style option instead of simply using the mask from
parent spinbox. If either specifies custom base color, use that to
paint the background of the spinbox's line edit.

Task-number: QTBUG-24323
Change-Id: I1e738192db83b16d9bd48da54d29779e18788ef7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/widgets/styles/qwindowsvistastyle.cpp
src/widgets/styles/qwindowsxpstyle.cpp