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 rounding: 8
|
||||||
property int smoothing: 32
|
property int smoothing: 32
|
||||||
|
property Tray tray: Tray {
|
||||||
|
}
|
||||||
|
|
||||||
component Popouts: JsonObject {
|
component Popouts: JsonObject {
|
||||||
property bool activeWindow: true
|
property bool activeWindow: true
|
||||||
@@ -69,4 +71,7 @@ JsonObject {
|
|||||||
property bool tray: true
|
property bool tray: true
|
||||||
property bool upower: true
|
property bool upower: true
|
||||||
}
|
}
|
||||||
|
component Tray: JsonObject {
|
||||||
|
property int trayIconSize: 24
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,6 +100,9 @@ Singleton {
|
|||||||
border: barConfig.border,
|
border: barConfig.border,
|
||||||
smoothing: barConfig.smoothing,
|
smoothing: barConfig.smoothing,
|
||||||
height: barConfig.height,
|
height: barConfig.height,
|
||||||
|
tray: {
|
||||||
|
trayIconSize: barConfig.tray.trayIconSize
|
||||||
|
},
|
||||||
popouts: {
|
popouts: {
|
||||||
tray: barConfig.popouts.tray,
|
tray: barConfig.popouts.tray,
|
||||||
audio: barConfig.popouts.audio,
|
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 {
|
SettingsSection {
|
||||||
sectionId: "Popouts"
|
sectionId: "Popouts"
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ Item {
|
|||||||
|
|
||||||
property bool current: popouts.currentName.startsWith(`traymenu${ind}`) && popouts.hasCurrent
|
property bool current: popouts.currentName.startsWith(`traymenu${ind}`) && popouts.hasCurrent
|
||||||
readonly property real dpr: Hypr.monitorFor(loader.screen).scale
|
readonly property real dpr: Hypr.monitorFor(loader.screen).scale
|
||||||
property bool hasLoaded: false
|
|
||||||
required property int ind
|
required property int ind
|
||||||
required property SystemTrayItem item
|
required property SystemTrayItem item
|
||||||
required property RowLayout loader
|
required property RowLayout loader
|
||||||
@@ -36,6 +35,8 @@ Item {
|
|||||||
return Quickshell.iconPath("telegram-attention-panel");
|
return Quickshell.iconPath("telegram-attention-panel");
|
||||||
else if (icon === Quickshell.iconPath("org.telegram.desktop-mute-symbolic"))
|
else if (icon === Quickshell.iconPath("org.telegram.desktop-mute-symbolic"))
|
||||||
return Quickshell.iconPath("telegram-mute-panel");
|
return Quickshell.iconPath("telegram-mute-panel");
|
||||||
|
} else if (app === "steam") {
|
||||||
|
return Quickshell.iconPath("steam_tray_mono");
|
||||||
}
|
}
|
||||||
|
|
||||||
return root.item.icon;
|
return root.item.icon;
|
||||||
@@ -75,7 +76,7 @@ Item {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
color: root.current ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
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
|
layer.enabled: Config.general.color.smart || Config.general.color.scheduleDark
|
||||||
scale: 1 / root.dpr
|
scale: 1 / root.dpr
|
||||||
source: root.resolveIcon(root.item.id, root.item.icon)
|
source: root.resolveIcon(root.item.id, root.item.icon)
|
||||||
|
|||||||
@@ -180,6 +180,14 @@ export const settingsIndex = [
|
|||||||
section: "Bar",
|
section: "Bar",
|
||||||
keywords: ["smoothing", "rounding"],
|
keywords: ["smoothing", "rounding"],
|
||||||
},
|
},
|
||||||
|
// System tray section
|
||||||
|
{
|
||||||
|
name: "Tray icon size",
|
||||||
|
category: "bar",
|
||||||
|
categoryName: "Bar",
|
||||||
|
section: "Tray",
|
||||||
|
keywords: ["tray", "icon", "size"],
|
||||||
|
},
|
||||||
// Popouts section
|
// Popouts section
|
||||||
{
|
{
|
||||||
name: "Tray",
|
name: "Tray",
|
||||||
|
|||||||
Reference in New Issue
Block a user