diff --git a/CLAUDE.md b/CLAUDE.md index 05af00ab..7e14191c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -13,7 +13,6 @@ This is a Quickshell-based desktop shell implementation with Material Design 3 d - **QML (Qt Modeling Language)** - Primary language for all UI components - **Quickshell Framework** - QML-based framework for building desktop shells - **Qt/QtQuick** - UI rendering and controls -- **Qt5Compat** - Graphical effects - **Wayland** - Display server protocol ## Development Commands diff --git a/Widgets/NotificationPopup.qml b/Widgets/NotificationPopup.qml index 7a4abb26..16b2a0db 100644 --- a/Widgets/NotificationPopup.qml +++ b/Widgets/NotificationPopup.qml @@ -21,19 +21,21 @@ PanelWindow { anchors { top: true right: true - bottom: true } - implicitWidth: 400 + margins { + top: Theme.barHeight + right: 0 + } + + implicitWidth: 396 + implicitHeight: 116 // Just the notification area Rectangle { id: popupContainer - width: 380 - height: 100 - anchors.top: parent.top - anchors.right: parent.right - anchors.topMargin: Theme.barHeight + 16 - anchors.rightMargin: 16 + anchors.fill: parent + anchors.topMargin: 16 // 16px from the top of this window + anchors.rightMargin: 16 // 16px from the right edge color: Theme.surfaceContainer radius: Theme.cornerRadiusLarge @@ -50,8 +52,9 @@ PanelWindow { anchors.rightMargin: 36 // Don't overlap with close button hoverEnabled: true cursorShape: Qt.PointingHandCursor + acceptedButtons: Qt.LeftButton - onClicked: { + onClicked: (mouse) => { console.log("Popup clicked!") if (root.activeNotification) { root.handleNotificationClick(root.activeNotification) @@ -65,6 +68,7 @@ PanelWindow { } // Always hide popup after click Utils.hideNotificationPopup() + mouse.accepted = true // Prevent event propagation } } @@ -91,7 +95,11 @@ PanelWindow { anchors.fill: parent hoverEnabled: true cursorShape: Qt.PointingHandCursor - onClicked: Utils.hideNotificationPopup() + acceptedButtons: Qt.LeftButton + onClicked: (mouse) => { + Utils.hideNotificationPopup() + mouse.accepted = true // Prevent event propagation + } } Behavior on color { diff --git a/Widgets/TopBar/TopBar.qml b/Widgets/TopBar/TopBar.qml index 49234f6a..2c0af6d0 100644 --- a/Widgets/TopBar/TopBar.qml +++ b/Widgets/TopBar/TopBar.qml @@ -9,6 +9,7 @@ import Quickshell.Services.SystemTray import Quickshell.Services.Notifications import Quickshell.Services.Mpris import "../../Common" +import "../../Common/Utilities.js" as Utils import "../../Services" import ".." @@ -177,6 +178,10 @@ PanelWindow { onClicked: { if (topBar.shellRoot) { + // Hide notification popup if visible + if (topBar.shellRoot.showNotificationPopup) { + Utils.hideNotificationPopup() + } topBar.shellRoot.calendarVisible = !topBar.shellRoot.calendarVisible } } @@ -195,6 +200,10 @@ PanelWindow { onClicked: { if (topBar.shellRoot) { + // Hide notification popup if visible + if (topBar.shellRoot.showNotificationPopup) { + Utils.hideNotificationPopup() + } topBar.shellRoot.calendarVisible = !topBar.shellRoot.calendarVisible } } @@ -243,6 +252,10 @@ PanelWindow { cursorShape: Qt.PointingHandCursor onClicked: { + // Hide notification popup if visible + if (topBar.shellRoot && topBar.shellRoot.showNotificationPopup) { + Utils.hideNotificationPopup() + } topBar.clipboardRequested() } } @@ -270,6 +283,10 @@ PanelWindow { isActive: topBar.shellRoot ? topBar.shellRoot.notificationHistoryVisible : false onClicked: { if (topBar.shellRoot) { + // Hide notification popup if visible + if (topBar.shellRoot.showNotificationPopup) { + Utils.hideNotificationPopup() + } topBar.shellRoot.notificationHistoryVisible = !topBar.shellRoot.notificationHistoryVisible } } @@ -291,6 +308,10 @@ PanelWindow { onClicked: { if (topBar.shellRoot) { + // Hide notification popup if visible + if (topBar.shellRoot.showNotificationPopup) { + Utils.hideNotificationPopup() + } topBar.shellRoot.controlCenterVisible = !topBar.shellRoot.controlCenterVisible if (topBar.shellRoot.controlCenterVisible) { WifiService.scanWifi()