new config option to set tray icon base size
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user