Cocoa: Fix appearance of transient light scroll bars.

On dark background scroll bars will be rendered light. Since
the scroller object is shared across intances, this flag also
has to be reset. Otherwise all scrollbars are drawn light.

Change-Id: I3800cc783d7fd7ebff296d9db7454efb5b33e7a3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
bb10
Christoph Schleifenbaum 2013-02-22 17:42:55 +01:00 committed by The Qt Project
parent 47e12eafdd
commit d400666c61
1 changed files with 2 additions and 0 deletions

View File

@ -5017,6 +5017,8 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
bgColor.blue() < 128;
if (isDarkBg)
[scroller setKnobStyle:NSScrollerKnobStyleLight];
else
[scroller setKnobStyle:NSScrollerKnobStyleDefault];
[scroller setControlSize:(tdi.kind == kThemeSmallScrollBar ? NSMiniControlSize
: NSRegularControlSize)];