QMacStyle: Minimize size of scrollbar transparency layer

Instead of allocating the full backing store size for
the transparency layer, we make sure we only allocate
exactly as much as needed by the scrollbar.

Change-Id: I55c3172fe3dd2a1f3fd46828463497f9f35cb1ae
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
Gabriel de Dietrich 2017-12-20 17:14:18 -08:00 committed by Liang Qi
parent e3c79b4356
commit c5a3022b04

View File

@ -5190,7 +5190,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
break;
if (isTransient) {
CGContextBeginTransparencyLayer(cg, NULL);
CGContextBeginTransparencyLayerWithRect(cg, scroller.frame, nullptr);
CGContextSetAlpha(cg, opacity);
}