QCommonStyle: pass orientation to PE_IndicatorProgressChunk

When drawing the chunks for the progress bar, we now have to pass at
least the State_Horizontal bit because the orientation member of
QStyleOptionProgressBar was replaced with this state bit.

Pick-to: 6.7 6.5
Fixes: QTBUG-129386
Change-Id: Ibc8b6b315609cdd1a6f949ae2116728b7c6bded8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d399bdddc6e71617e045fc77e70abef3ed2ee006)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Christian Ehrlicher 2024-10-04 21:45:07 +02:00 committed by Qt Cherry-pick Bot
parent 5e8feb69df
commit dc124f2069

View File

@ -1638,7 +1638,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
pbBits.palette = pal2;
int myY = pbBits.rect.y();
int myHeight = pbBits.rect.height();
pbBits.state = State_None;
pbBits.state &= QStyle::State_Horizontal; // all other is irrelevant here
for (int i = 0; i < nu; ++i) {
pbBits.rect.setRect(x0 + x, myY, unit_width, myHeight);
pbBits.rect = m.mapRect(QRectF(pbBits.rect)).toRect();