Fix highdpi CE_HeaderLabel pixmaps in fusion style
Make sure enough pixels is sourced by multiplying the layout rect size with the pixmaps devicePixelRatio. Task-number: QTBUG-31477 Change-Id: I742603c09a65a520587da3eef9479ef7f0c87022 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
30a4114e60
commit
44a58de2ae
@ -1525,7 +1525,10 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
||||
|
||||
QRect aligned = alignedRect(header->direction, QFlag(header->iconAlignment), pixmap.size() / pixmap.devicePixelRatio(), rect);
|
||||
QRect inter = aligned.intersected(rect);
|
||||
p->drawPixmap(inter.x(), inter.y(), pixmap, inter.x() - aligned.x(), inter.y() - aligned.y(), inter.width(), inter.height());
|
||||
p->drawPixmap(inter.x(), inter.y(), pixmap,
|
||||
inter.x() - aligned.x(), inter.y() - aligned.y(),
|
||||
aligned.width() * pixmap.devicePixelRatio(),
|
||||
pixmap.height() * pixmap.devicePixelRatio());
|
||||
|
||||
if (header->direction == Qt::LeftToRight)
|
||||
rect.setLeft(rect.left() + pixw + 2);
|
||||
|
Loading…
Reference in New Issue
Block a user