FusionStyle: fix QCachedPainter usage for PE_PanelButtonCommand
When using a QCachedPainter we must ensure to paint with topleft at 0/0 which was not the case for PE_PanelButtonCommand. This amends e70cc743bc89afa7f36cd6afa520af2dab763c3a. Task-number: QTBUG-129680 Change-Id: I48de1163c675d9bc0d177b57d361a2af4ef5dbda Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
ad50ca7d9e
commit
a4d4d04bbd
@ -775,7 +775,7 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
|
||||
|
||||
QCachedPainter p(painter, u"pushbutton-" + buttonColor.name(QColor::HexArgb), option);
|
||||
if (p.needsPainting()) {
|
||||
const QRect &rect = option->rect;
|
||||
const QRect rect = QRect(0, 0, option->rect.width(), option->rect.height());
|
||||
const QRect r = rect.adjusted(0, 1, -1, 0);
|
||||
const QColor &darkOutline = (hasFocus | isDefault) ? highlightedOutline : outline;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user