From 67ca72796e23269451795baf9adde02a184a7b9e Mon Sep 17 00:00:00 2001 From: Nico Rieck Date: Wed, 24 Feb 2016 21:46:10 +0100 Subject: Paint small progressbars correctly on Vista+ The animated glow always has a length of 120 but was previously drawn with the clipping rect of the bar's actual size. For sizes smaller than 120 the native theme part would be clipped and the black gradient would show. Change-Id: Id81e39c405ef81ae08af0f64249568016944bdf1 Task-number: QTBUG-51266 Reviewed-by: Friedemann Kleint Reviewed-by: Alessandro Portale --- src/widgets/styles/qwindowsvistastyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index 971fb1be7c..2ce54fe207 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -1059,7 +1059,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption QPainter imagePainter(&image); theme.painter = &imagePainter; theme.partId = vertical ? PP_FILLVERT : PP_FILL; - theme.rect = QRect(QPoint(0,0), theme.rect.size()); + theme.rect = QRect(QPoint(0,0), animRect.size()); QLinearGradient alphaGradient(0, 0, vertical ? 0 : image.width(), vertical ? image.height() : 0); alphaGradient.setColorAt(0, QColor(0, 0, 0, 0)); -- cgit v1.2.3