feat: add ability to toggle notification popup visibility via IPC
This commit is contained in:
parent
ca48eef612
commit
f8db6ba9df
3 changed files with 19 additions and 2 deletions
|
|
@ -8,11 +8,12 @@ PanelWindow {
|
|||
implicitWidth: 350
|
||||
implicitHeight: notificationColumn.implicitHeight
|
||||
color: "transparent"
|
||||
visible: notificationModel.count > 0
|
||||
visible: notificationsVisible && notificationModel.count > 0
|
||||
screen: Quickshell.primaryScreen !== undefined ? Quickshell.primaryScreen : null
|
||||
focusable: false
|
||||
|
||||
property bool barVisible: true
|
||||
property bool notificationsVisible: true
|
||||
|
||||
anchors.top: true
|
||||
anchors.right: true
|
||||
|
|
@ -26,6 +27,12 @@ PanelWindow {
|
|||
property int maxVisible: 5
|
||||
property int spacing: 5
|
||||
|
||||
function togglePopup(): void {
|
||||
console.log("[NotificationPopup] Current state: " + notificationsVisible);
|
||||
notificationsVisible = !notificationsVisible;
|
||||
console.log("[NotificationPopup] New state: " + notificationsVisible);
|
||||
}
|
||||
|
||||
function addNotification(notification) {
|
||||
notificationModel.insert(0, {
|
||||
id: notification.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue