Linux: Fix QLabel content truncated under high dpi
Fixed truncation of pixmap content under high device pixel ratio of QLabel. Pick-to: 5.15 Fixes: QTBUG-86170 Change-Id: I795815e0d8a9e57e0dfcca9cf104e86e45027b18 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>bb10
parent
257285553f
commit
eb98bed4e7
|
|
@ -627,7 +627,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
|
|||
QRect aligned = alignedRect(QGuiApplication::layoutDirection(), QFlag(alignment), pixmap.size() / scale, rect);
|
||||
QRect inter = aligned.intersected(rect);
|
||||
|
||||
painter->drawPixmap(inter.x(), inter.y(), pixmap, inter.x() - aligned.x(), inter.y() - aligned.y(), inter.width() * scale, inter.height() *scale);
|
||||
painter->drawPixmap(inter.x(), inter.y(), pixmap, inter.x() - aligned.x(), inter.y() - aligned.y(), qRound(inter.width() * scale), qRound(inter.height() *scale));
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Reference in New Issue