Client: support high-dpi mode for window icon
Fixes: QTBUG-90530 Pick-to: 6.3 6.2 5.15 Change-Id: Ib1f36e1cb89352dfac8a385a7b097cfc0226e813 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
39388b160c
commit
1616b042bb
@ -168,13 +168,10 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
|
||||
// Window icon
|
||||
QIcon icon = waylandWindow()->windowIcon();
|
||||
if (!icon.isNull()) {
|
||||
QPixmap pixmap = icon.pixmap(QSize(128, 128));
|
||||
QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
|
||||
QRectF iconRect(0, 0, 22, 22);
|
||||
p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4,
|
||||
iconRect.adjust(margins().left() + BUTTON_SPACING, 4,
|
||||
margins().left() + BUTTON_SPACING, 4),
|
||||
scaled, iconRect);
|
||||
icon.paint(&p, iconRect.toRect());
|
||||
}
|
||||
|
||||
// Window title
|
||||
|
Loading…
x
Reference in New Issue
Block a user