From fefa4dc1f0a2784b2377e7d0b64f754698f7c59c Mon Sep 17 00:00:00 2001 From: Maks Naumov Date: Sat, 6 Sep 2014 14:33:28 +0300 Subject: 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 Reviewed-by: Friedemann Kleint --- src/widgets/styles/qwindowsvistastyle.cpp | 1 - src/widgets/styles/qwindowsxpstyle.cpp | 1 - 2 files changed, 2 deletions(-) (limited to 'src/widgets/styles') 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); -- cgit v1.2.3