fix statelayer colors for various components, add logic for color background feedback on tray items when icon doesn't have color layer
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user