From 8ec7faaafd1f295be2d12ae079f693d9dd88a53a Mon Sep 17 00:00:00 2001 From: zach Date: Mon, 8 Jun 2026 18:35:34 +0200 Subject: [PATCH] fix statelayer colors for various components, add logic for color background feedback on tray items when icon doesn't have color layer --- Modules/Clock.qml | 1 + Modules/NotifBell.qml | 2 ++ Modules/Resources.qml | 2 ++ Modules/Settings/Categories.qml | 2 ++ Modules/SysTray/TrayItem.qml | 5 +++-- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Modules/Clock.qml b/Modules/Clock.qml index 67ff432..ccbd8cd 100644 --- a/Modules/Clock.qml +++ b/Modules/Clock.qml @@ -34,6 +34,7 @@ CustomRect { StateLayer { acceptedButtons: Qt.LeftButton + color: root.visibilities.dashboard ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface onClicked: { root.visibilities.dashboard = !root.visibilities.dashboard; diff --git a/Modules/NotifBell.qml b/Modules/NotifBell.qml index eb86926..4c24ee2 100644 --- a/Modules/NotifBell.qml +++ b/Modules/NotifBell.qml @@ -32,6 +32,8 @@ CustomRect { } StateLayer { + color: root.visibilities.sidebar ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface + onClicked: { root.visibilities.sidebar = !root.visibilities.sidebar; } diff --git a/Modules/Resources.qml b/Modules/Resources.qml index 2334666..a9cccb1 100644 --- a/Modules/Resources.qml +++ b/Modules/Resources.qml @@ -20,6 +20,8 @@ CustomRect { radius: Appearance.rounding.full StateLayer { + color: root.visibilities.resources ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface + onClicked: root.visibilities.resources = !root.visibilities.resources } diff --git a/Modules/Settings/Categories.qml b/Modules/Settings/Categories.qml index df9875a..cce3bb6 100644 --- a/Modules/Settings/Categories.qml +++ b/Modules/Settings/Categories.qml @@ -210,6 +210,8 @@ Item { StateLayer { id: layer + color: categoryItem.index === clayout.currentIndex ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface + onClicked: { root.content.currentCategory = categoryItem.key; clayout.currentIndex = categoryItem.index; diff --git a/Modules/SysTray/TrayItem.qml b/Modules/SysTray/TrayItem.qml index 5f3b246..fbbd1fc 100644 --- a/Modules/SysTray/TrayItem.qml +++ b/Modules/SysTray/TrayItem.qml @@ -45,14 +45,15 @@ Item { CustomRect { anchors.fill: parent anchors.margins: 3 - color: root.current ? DynamicColors.palette.m3primary : "transparent" + color: Config.general.color.scheduleDark && root.current ? DynamicColors.palette.m3primary : "transparent" radius: Appearance.rounding.full StateLayer { acceptedButtons: Qt.LeftButton | Qt.RightButton anchors.fill: parent + color: Config.general.color.scheduleDark && root.current ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface - onClicked: { + onClicked: mouse => { if (mouse.button === Qt.LeftButton) { root.item.activate(); console.log(icon.source + "\n" + root.item.id);