Merge pull request #2 from ferrreo/icon-quality

fix: swap image to iconimage for icons for better quality
This commit is contained in:
Lysec 2025-07-12 14:44:24 +02:00 committed by GitHub
commit af39a17a6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions

View file

@ -3,6 +3,7 @@ import Quickshell
import qs.Components import qs.Components
import qs.Settings import qs.Settings
import Quickshell.Wayland import Quickshell.Wayland
import Quickshell.Widgets
Item { Item {
id: activeWindowWrapper id: activeWindowWrapper
@ -59,10 +60,10 @@ Item {
anchors.top: parent.top anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
Image { IconImage {
id: icon id: icon
width: 10 width: 12
height: 10 height: 12
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 6 anchors.leftMargin: 6
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter

View file

@ -3,6 +3,7 @@ import QtQuick.Layouts
import QtQuick.Controls import QtQuick.Controls
import Quickshell import Quickshell
import Quickshell.Services.SystemTray import Quickshell.Services.SystemTray
import Quickshell.Widgets
Row { Row {
property var bar property var bar
@ -41,16 +42,13 @@ Row {
} }
} }
Image { IconImage {
id: trayIcon id: trayIcon
anchors.centerIn: parent anchors.centerIn: parent
width: 18 width: 18
height: 18 height: 18
sourceSize.width: 18
sourceSize.height: 18
smooth: false // Memory savings smooth: false // Memory savings
asynchronous: true asynchronous: true
cache: false
source: { source: {
let icon = modelData?.icon || ""; let icon = modelData?.icon || "";
if (!icon) return ""; if (!icon) return "";