From e5595d8b5dc0f4f115c2d1f08e0a9d547e2d577e Mon Sep 17 00:00:00 2001 From: Zacharias-Brohn Date: Mon, 2 Mar 2026 18:43:16 +0100 Subject: [PATCH] traywidget background --- Drawers/Bar.qml | 2 +- Modules/Bar/BarLoader.qml | 2 +- Modules/TrayWidget.qml | 51 +++++++++++++++++++++++++++------------ 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/Drawers/Bar.qml b/Drawers/Bar.qml index 2bf2348..02d3e3c 100644 --- a/Drawers/Bar.qml +++ b/Drawers/Bar.qml @@ -185,7 +185,7 @@ Variants { anchors.top: parent.top anchors.topMargin: Config.barConfig.autoHide && !visibilities.bar ? -30 : 0 color: "transparent" - implicitHeight: barLoader.childrenRect.height + implicitHeight: barLoader.implicitHeight radius: 0 Behavior on anchors.topMargin { diff --git a/Modules/Bar/BarLoader.qml b/Modules/Bar/BarLoader.qml index 6b1d1e6..2c3a70a 100644 --- a/Modules/Bar/BarLoader.qml +++ b/Modules/Bar/BarLoader.qml @@ -52,7 +52,7 @@ RowLayout { } } - implicitHeight: childrenRect.height + implicitHeight: 34 CustomShortcut { name: "toggle-overview" diff --git a/Modules/TrayWidget.qml b/Modules/TrayWidget.qml index 218a94d..07e2e02 100644 --- a/Modules/TrayWidget.qml +++ b/Modules/TrayWidget.qml @@ -4,8 +4,10 @@ import QtQuick import QtQuick.Layouts import Quickshell import Quickshell.Services.SystemTray +import qs.Components +import qs.Config -Row { +Item { id: root required property PanelWindow bar @@ -15,26 +17,43 @@ Row { anchors.bottom: parent.bottom anchors.top: parent.top - spacing: 0 + implicitHeight: 34 + implicitWidth: row.width + Appearance.padding.small * 2 - Repeater { - id: repeater + CustomClippingRect { + anchors.left: parent.left + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + color: DynamicColors.tPalette.m3surfaceContainer + implicitHeight: root.parent.height - ((Appearance.padding.small - 1) * 2) + radius: height / 2 - model: SystemTray.items + Row { + id: row - TrayItem { - id: trayItem + anchors.centerIn: parent + spacing: 0 - required property int index - required property SystemTrayItem modelData + Repeater { + id: repeater - bar: root.bar - implicitHeight: 34 - implicitWidth: 34 - ind: index - item: modelData - loader: root.loader - popouts: root.popouts + model: SystemTray.items + + TrayItem { + id: trayItem + + required property int index + required property SystemTrayItem modelData + + bar: root.bar + implicitHeight: 34 + implicitWidth: 34 + ind: index + item: modelData + loader: root.loader + popouts: root.popouts + } + } } } }