Windows styles: Avoid theme.rect recalculation
In both cases theme.rect calculated right after the "sub & SC_ScrollBarSlider" test. Change-Id: I9fa0c4e1327e68b4184674a13e7a4bf362f8deff Reviewed-by: Adam Majer <adamm@zombino.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
af155105a9
commit
fefa4dc1f0
@ -1757,7 +1757,6 @@ void QWindowsVistaStyle::drawComplexControl(ComplexControl control, const QStyle
|
||||
stateId = SCRBS_NORMAL;
|
||||
|
||||
// Draw handle
|
||||
theme.rect = proxy()->subControlRect(CC_ScrollBar, option, SC_ScrollBarSlider, widget);
|
||||
theme.partId = flags & State_Horizontal ? SBP_THUMBBTNHORZ : SBP_THUMBBTNVERT;
|
||||
theme.stateId = stateId;
|
||||
d->drawBackground(theme);
|
||||
|
@ -2758,7 +2758,6 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo
|
||||
stateId = SCRBS_NORMAL;
|
||||
|
||||
// Draw handle
|
||||
theme.rect = proxy()->subControlRect(CC_ScrollBar, option, SC_ScrollBarSlider, widget);
|
||||
theme.partId = flags & State_Horizontal ? SBP_THUMBBTNHORZ : SBP_THUMBBTNVERT;
|
||||
theme.stateId = stateId;
|
||||
d->drawBackground(theme);
|
||||
|
Loading…
Reference in New Issue
Block a user