load higher resolution tray icons for high-dpi screens
This commit is contained in:
@@ -3,6 +3,7 @@ import QtQuick
|
||||
import QtQuick.VectorImage
|
||||
import Quickshell
|
||||
import Quickshell.Services.SystemTray
|
||||
import qs.Helpers
|
||||
import qs.Modules
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
@@ -11,6 +12,7 @@ Item {
|
||||
id: root
|
||||
|
||||
property bool current: popouts.currentName.startsWith(`traymenu${ind}`) && popouts.hasCurrent
|
||||
readonly property real dpr: Hypr.monitorFor(loader.screen).scale
|
||||
property bool hasLoaded: false
|
||||
required property int ind
|
||||
required property SystemTrayItem item
|
||||
@@ -48,9 +50,11 @@ Item {
|
||||
id: icon
|
||||
|
||||
anchors.centerIn: parent
|
||||
antialiasing: true
|
||||
color: root.current ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
implicitSize: 22
|
||||
implicitSize: 24 * root.dpr
|
||||
layer.enabled: Config.general.color.smart || Config.general.color.scheduleDark
|
||||
scale: 1 / root.dpr
|
||||
source: root.item.icon
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user