fix statelayer colors for various components, add logic for color background feedback on tray items when icon doesn't have color layer
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 10s
Python / lint-format (pull_request) Successful in 16s
Python / test (pull_request) Successful in 27s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m5s

This commit is contained in:
2026-06-08 18:35:34 +02:00
parent ea911996a8
commit 8ec7faaafd
5 changed files with 10 additions and 2 deletions
+1
View File
@@ -34,6 +34,7 @@ CustomRect {
StateLayer { StateLayer {
acceptedButtons: Qt.LeftButton acceptedButtons: Qt.LeftButton
color: root.visibilities.dashboard ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
onClicked: { onClicked: {
root.visibilities.dashboard = !root.visibilities.dashboard; root.visibilities.dashboard = !root.visibilities.dashboard;
+2
View File
@@ -32,6 +32,8 @@ CustomRect {
} }
StateLayer { StateLayer {
color: root.visibilities.sidebar ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
onClicked: { onClicked: {
root.visibilities.sidebar = !root.visibilities.sidebar; root.visibilities.sidebar = !root.visibilities.sidebar;
} }
+2
View File
@@ -20,6 +20,8 @@ CustomRect {
radius: Appearance.rounding.full radius: Appearance.rounding.full
StateLayer { StateLayer {
color: root.visibilities.resources ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
onClicked: root.visibilities.resources = !root.visibilities.resources onClicked: root.visibilities.resources = !root.visibilities.resources
} }
+2
View File
@@ -210,6 +210,8 @@ Item {
StateLayer { StateLayer {
id: layer id: layer
color: categoryItem.index === clayout.currentIndex ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
onClicked: { onClicked: {
root.content.currentCategory = categoryItem.key; root.content.currentCategory = categoryItem.key;
clayout.currentIndex = categoryItem.index; clayout.currentIndex = categoryItem.index;
+3 -2
View File
@@ -45,14 +45,15 @@ Item {
CustomRect { CustomRect {
anchors.fill: parent anchors.fill: parent
anchors.margins: 3 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 radius: Appearance.rounding.full
StateLayer { StateLayer {
acceptedButtons: Qt.LeftButton | Qt.RightButton acceptedButtons: Qt.LeftButton | Qt.RightButton
anchors.fill: parent anchors.fill: parent
color: Config.general.color.scheduleDark && root.current ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
onClicked: { onClicked: mouse => {
if (mouse.button === Qt.LeftButton) { if (mouse.button === Qt.LeftButton) {
root.item.activate(); root.item.activate();
console.log(icon.source + "\n" + root.item.id); console.log(icon.source + "\n" + root.item.id);