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
parent
ea86f73640
commit
67ca72796e
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue