Drawing fix for overlay scrollbars on Mac.
authorChristoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Thu, 23 Aug 2012 16:36:57 +0000 (18:36 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 29 Aug 2012 10:48:10 +0000 (12:48 +0200)
A wrong check lead to a scrollbar with value 0 never been draw. This is
the fix for it. Instead is has to be checked for a length of 0.

Change-Id: I0c4e2f7e0014074e3c22554bcbea0ebfc3122952
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
src/widgets/styles/qmacstyle_mac.mm

index d1e4231..9ab1663 100644 (file)
@@ -5206,7 +5206,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
                     [scroller setFrame:NSMakeRect(0, 0, slider->rect.width(), height)];
                     CGContextTranslateCTM(cg, 0, value * totalHeight);
                 }
-                if (value > 0.0) {
+                if (length > 0.0) {
                     [scroller layout];
                     [scroller displayRectIgnoringOpacity:[scroller bounds]
                                                inContext:[NSGraphicsContext currentContext]];