mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 08:22:51 -05:00
fix: Restore SystemTray
This commit is contained in:
@@ -113,7 +113,7 @@ ScrollView {
|
|||||||
// Default widget configurations for each section
|
// Default widget configurations for each section
|
||||||
property var defaultLeftWidgets: ["launcherButton", "workspaceSwitcher", "focusedWindow"]
|
property var defaultLeftWidgets: ["launcherButton", "workspaceSwitcher", "focusedWindow"]
|
||||||
property var defaultCenterWidgets: ["music", "clock", "weather"]
|
property var defaultCenterWidgets: ["music", "clock", "weather"]
|
||||||
property var defaultRightWidgets: ["clipboard", "systemResources", "notificationButton", "battery", "controlCenterButton"]
|
property var defaultRightWidgets: ["systemTray", "clipboard", "systemResources", "notificationButton", "battery", "controlCenterButton"]
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
// Initialize sections with defaults if they're empty
|
// Initialize sections with defaults if they're empty
|
||||||
|
|||||||
@@ -7,21 +7,21 @@ Rectangle {
|
|||||||
|
|
||||||
signal menuRequested(var menu, var item, real x, real y)
|
signal menuRequested(var menu, var item, real x, real y)
|
||||||
|
|
||||||
readonly property int calculatedWidth: systemTrayRow.children.length > 1 ?
|
readonly property int calculatedWidth: SystemTray.items.values.length > 0 ?
|
||||||
(systemTrayRow.children.length - 1) * 24 + (systemTrayRow.children.length - 2) * Theme.spacingXS + Theme.spacingS * 2 : 0
|
SystemTray.items.values.length * 24 + (SystemTray.items.values.length - 1) * Theme.spacingXS + Theme.spacingS * 2 : 0
|
||||||
|
|
||||||
width: calculatedWidth
|
width: calculatedWidth
|
||||||
height: 30
|
height: 30
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: {
|
color: {
|
||||||
// Only show background when there are system tray items to display
|
// Only show background when there are system tray items to display
|
||||||
if (!SystemTray.items || SystemTray.items.length === 0)
|
if (SystemTray.items.values.length === 0)
|
||||||
return "transparent";
|
return "transparent";
|
||||||
|
|
||||||
const baseColor = Theme.secondaryHover;
|
const baseColor = Theme.secondaryHover;
|
||||||
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * Theme.widgetTransparency);
|
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * Theme.widgetTransparency);
|
||||||
}
|
}
|
||||||
visible: SystemTray.items && SystemTray.items.length > 0
|
visible: SystemTray.items.values.length > 0
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: systemTrayRow
|
id: systemTrayRow
|
||||||
@@ -30,7 +30,7 @@ Rectangle {
|
|||||||
spacing: Theme.spacingXS
|
spacing: Theme.spacingXS
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: SystemTray.items
|
model: SystemTray.items.values
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
property var trayItem: modelData
|
property var trayItem: modelData
|
||||||
|
|||||||
Reference in New Issue
Block a user