From 2b568e018ea232fe6a919b8f0027012c8921b061 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Fri, 21 Aug 2009 14:31:04 +0200 Subject: Fix double drawing of background in XP scrollbar Task-number: 259998 Reviewed-by: eskil The patch removes double drawing of SBP_LOWERTRACKVERT/HORZ as it is redundant to draw this under the gripper as well as on the bar itself. It also breaks for certain non-standard XP themes. The patch was suggested by Jonathan Liu. --- src/gui/styles/qwindowsxpstyle.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/gui/styles') diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index 191b71ea6d..0e087308b1 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -2672,11 +2672,8 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo // Draw gripper if there is enough space if (!gripperBounds.isEmpty()) { p->save(); - XPThemeData grippBackground = theme; - grippBackground.partId = flags & State_Horizontal ? SBP_LOWERTRACKHORZ : SBP_LOWERTRACKVERT; theme.rect = gripperBounds; p->setClipRegion(d->region(theme));// Only change inside the region of the gripper - d->drawBackground(grippBackground);// The gutter is the grippers background d->drawBackground(theme); // Transparent gripper ontop of background p->restore(); } -- cgit v1.2.1