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 <Friedemann.Kleint@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
bb10
Nico Rieck 2016-02-24 21:46:10 +01:00 committed by Alessandro Portale
parent ea86f73640
commit 67ca72796e
1 changed files with 1 additions and 1 deletions

View File

@ -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));