From e4087938a51a6549ea1fefa2a056f9aff0fa64ee Mon Sep 17 00:00:00 2001 From: Amaro Lopes Date: Sun, 12 Oct 2025 21:57:14 -0300 Subject: [PATCH] change some colors and styling, fix a issue with activeAsync in notifications Window --- Common/CalendarComponent.qml | 3 +-- NotificationsWidget.qml | 20 ++++++++++---------- Widgets/NotificationWindow.qml | 9 +++++---- Workspaces.qml | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Common/CalendarComponent.qml b/Common/CalendarComponent.qml index 60863df..2a7d9f1 100644 --- a/Common/CalendarComponent.qml +++ b/Common/CalendarComponent.qml @@ -1,6 +1,5 @@ // CalendarComponent.qml (For one month) import QtQuick -import QtQuick.Controls import qs.Common import qs.Common.Styled @@ -93,7 +92,7 @@ Item { let isCurrentMonth = root.targetYear === root.currentDate.getFullYear() && root.targetMonth === root.currentDate.getMonth(); let isCurrentDay = isCurrentMonth && modelData === root.currentDate.getDate(); - return isCurrentDay ? Theme.color6Bright : Theme.textColor; + return isCurrentDay ? Theme.color5Bright : Theme.textColor; } } } diff --git a/NotificationsWidget.qml b/NotificationsWidget.qml index 335d534..3f50b76 100644 --- a/NotificationsWidget.qml +++ b/NotificationsWidget.qml @@ -23,28 +23,28 @@ Item { name: "MuteActive" when: NotificationService.notificationsMuted && NotificationService.notificationsNumber PropertyChanges { - root.notificationIcon : "\udb80\udc9b " + NotificationService.notificationsNumber + root.notificationIcon: "\udb80\udc9b " + NotificationService.notificationsNumber } }, State { name: "Active" when: !NotificationService.notificationsMuted && NotificationService.notificationsNumber PropertyChanges { - root.notificationIcon : "\udb80\udc9a " + NotificationService.notificationsNumber + root.notificationIcon: "\udb80\udc9a " + NotificationService.notificationsNumber } }, State { name: "MuteEmpty" when: NotificationService.notificationsMuted PropertyChanges { - root.notificationIcon : "\uec08" + root.notificationIcon: "\uec08" } }, State { name: "Empty" when: !NotificationService.notificationsMuted && !NotificationService.notificationsNumber PropertyChanges { - root.notificationIcon : "\ueaa2" + root.notificationIcon: "\ueaa2" } } ] @@ -65,7 +65,7 @@ Item { id: notifText anchors.fill: parent - text: root.notificationIcon + text: root.notificationIcon } MouseArea { @@ -74,9 +74,10 @@ Item { onClicked: mouse => { if (mouse.button === Qt.RightButton) { - NotificationService.manualNotificationsMuted = !NotificationService.manualNotificationsMuted + NotificationService.manualNotificationsMuted = !NotificationService.manualNotificationsMuted; return; - } + } + console.log(root.createWindow); root.createWindow = !root.createWindow; } } @@ -85,11 +86,10 @@ Item { LazyLoader { id: windowLoader - activeAsync: NotificationService.notificationsNumber ? createWindow : false + active: NotificationService.notificationsNumber ? root.createWindow : false component: NotificationWindow { - onClear: root.createWindow = false + onClear: root.createWindow = false } - } } diff --git a/Widgets/NotificationWindow.qml b/Widgets/NotificationWindow.qml index 071ca36..32622a8 100644 --- a/Widgets/NotificationWindow.qml +++ b/Widgets/NotificationWindow.qml @@ -8,7 +8,7 @@ import qs.Services import qs.Widgets import qs.Common.Styled import qs.Common -import Quickshell.Wayland +import Quickshell.Wayland PanelWindow { id: notificationRoot @@ -32,7 +32,8 @@ PanelWindow { contentItem { focus: true Keys.onPressed: event => { - if (event.key == Qt.Key_Escape) notificationRoot.clear(); + if (event.key == Qt.Key_Escape) + notificationRoot.clear(); } } MouseArea { @@ -43,7 +44,7 @@ PanelWindow { Rectangle { id: notifWindow - anchors{ + anchors { top: parent.top left: parent.left } @@ -68,7 +69,7 @@ PanelWindow { anchors.fill: parent onClicked: { while (NotificationService.notificationsNumber != 0) { - NotificationService.notificationDismiss(NotificationService.trackedNotifications.get(0).notif) + NotificationService.notificationDismiss(NotificationService.trackedNotifications.get(0).notif); } } } diff --git a/Workspaces.qml b/Workspaces.qml index e62635a..eecfb42 100644 --- a/Workspaces.qml +++ b/Workspaces.qml @@ -65,7 +65,7 @@ WrapperMouseArea { when: workspacesRectangle.workspaceActive PropertyChanges { workspacesRectangle { - color: Theme.color6 + color: Theme.color5 implicitWidth: Theme.barSize * 1.5 } }