Decode launcher and tray icons at physical resolution
Quickshell's IconImage decodes at logical size, so on HiDPI displays PNG icons were rendered from a texture at half the needed resolution and looked blurry next to SVG icons. Use plain Image with sourceSize scaled by Screen.devicePixelRatio, as the notification widgets already do. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
4c38afeac3
commit
6a047462e8
@@ -1,7 +1,6 @@
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Ui
|
||||
@@ -591,15 +590,18 @@ Item {
|
||||
width: root.iconSlotWidth
|
||||
height: parent.height
|
||||
|
||||
IconImage {
|
||||
Image {
|
||||
id: appIcon
|
||||
anchors.centerIn: parent
|
||||
implicitSize: root.iconSize
|
||||
width: root.iconSize
|
||||
height: root.iconSize
|
||||
fillMode: Image.PreserveAspectFit
|
||||
// Decode at physical pixels: IconImage uses the logical size,
|
||||
// which leaves PNG icons upscaled and blurry on HiDPI displays.
|
||||
sourceSize.width: root.iconSize * Screen.devicePixelRatio
|
||||
sourceSize.height: root.iconSize * Screen.devicePixelRatio
|
||||
source: root.iconSource(row.icon)
|
||||
asynchronous: true
|
||||
mipmap: true
|
||||
}
|
||||
|
||||
Text {
|
||||
|
||||
Reference in New Issue
Block a user