diff options
author | Maks Naumov <maksqwe1@ukr.net> | 2014-09-06 14:33:28 +0300 |
---|---|---|
committer | Adam Majer <adamm@zombino.com> | 2014-09-08 22:44:42 +0200 |
commit | fefa4dc1f0a2784b2377e7d0b64f754698f7c59c (patch) | |
tree | 5f234cd72e19c76249d0cdbd1a2bd843b25c8c75 /src/widgets/styles | |
parent | af155105a9f48e3e96a7f1961732c38ff12465f4 (diff) |
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>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qwindowsvistastyle.cpp | 1 | ||||
-rw-r--r-- | src/widgets/styles/qwindowsxpstyle.cpp | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index e5acd22f16..8b79a68f61 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -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); diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp index 08ebe1c5ad..8dc3c6cb48 100644 --- a/src/widgets/styles/qwindowsxpstyle.cpp +++ b/src/widgets/styles/qwindowsxpstyle.cpp @@ -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); |