diff --git a/Config/BarConfig.qml b/Config/BarConfig.qml index a9d2be1..0f489ef 100644 --- a/Config/BarConfig.qml +++ b/Config/BarConfig.qml @@ -59,6 +59,8 @@ JsonObject { } property int rounding: 8 property int smoothing: 32 + property Tray tray: Tray { + } component Popouts: JsonObject { property bool activeWindow: true @@ -69,4 +71,7 @@ JsonObject { property bool tray: true property bool upower: true } + component Tray: JsonObject { + property int trayIconSize: 24 + } } diff --git a/Config/Config.qml b/Config/Config.qml index 7bb6b0a..009e67a 100644 --- a/Config/Config.qml +++ b/Config/Config.qml @@ -100,6 +100,9 @@ Singleton { border: barConfig.border, smoothing: barConfig.smoothing, height: barConfig.height, + tray: { + trayIconSize: barConfig.tray.trayIconSize + }, popouts: { tray: barConfig.popouts.tray, audio: barConfig.popouts.audio, diff --git a/Modules/Settings/Categories/Bar.qml b/Modules/Settings/Categories/Bar.qml index b7afaab..f139ef8 100644 --- a/Modules/Settings/Categories/Bar.qml +++ b/Modules/Settings/Categories/Bar.qml @@ -56,6 +56,21 @@ SettingsPage { } } + SettingsSection { + sectionId: "Tray" + + SettingsHeader { + name: "System tray" + } + + SettingSpinBox { + min: 16 + name: "Tray icon size" + object: Config.barConfig.tray + setting: "trayIconSize" + } + } + SettingsSection { sectionId: "Popouts" diff --git a/Modules/SysTray/TrayItem.qml b/Modules/SysTray/TrayItem.qml index e29e797..5f3b246 100644 --- a/Modules/SysTray/TrayItem.qml +++ b/Modules/SysTray/TrayItem.qml @@ -13,7 +13,6 @@ Item { 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 required property RowLayout loader @@ -36,6 +35,8 @@ Item { return Quickshell.iconPath("telegram-attention-panel"); else if (icon === Quickshell.iconPath("org.telegram.desktop-mute-symbolic")) return Quickshell.iconPath("telegram-mute-panel"); + } else if (app === "steam") { + return Quickshell.iconPath("steam_tray_mono"); } return root.item.icon; @@ -75,7 +76,7 @@ Item { anchors.centerIn: parent antialiasing: true color: root.current ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface - implicitSize: 24 * root.dpr + implicitSize: Config.barConfig.tray.trayIconSize * root.dpr layer.enabled: Config.general.color.smart || Config.general.color.scheduleDark scale: 1 / root.dpr source: root.resolveIcon(root.item.id, root.item.icon) diff --git a/scripts/SettingsIndex.mjs b/scripts/SettingsIndex.mjs index 12c74e1..d5aec75 100644 --- a/scripts/SettingsIndex.mjs +++ b/scripts/SettingsIndex.mjs @@ -180,6 +180,14 @@ export const settingsIndex = [ section: "Bar", keywords: ["smoothing", "rounding"], }, + // System tray section + { + name: "Tray icon size", + category: "bar", + categoryName: "Bar", + section: "Tray", + keywords: ["tray", "icon", "size"], + }, // Popouts section { name: "Tray",