feat: add notification window with debug option
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Services.Notifications
|
||||
import "../../config"
|
||||
import "./notificationServer"
|
||||
@@ -30,7 +31,7 @@ PanelWindow {
|
||||
if (!NotificationS.correctMonitor(screen))
|
||||
return
|
||||
if (NotificationS.correctMonitor(screen)) {
|
||||
console.log("[Notification]: This notification belongs to me!", screen.x, screen.y)
|
||||
console.log("[NotificationWindow " + Hyprland.monitorFor(screen).activeWorkspace.id + "]: This notification belongs to me! ")
|
||||
notificationListModel.append({notificationData: notification})
|
||||
}
|
||||
}
|
||||
@@ -55,15 +56,17 @@ PanelWindow {
|
||||
delegate: NotificationBody {
|
||||
required property int index
|
||||
required property var notificationData
|
||||
screen: notificationWindow.screen
|
||||
|
||||
notification: notificationData
|
||||
|
||||
onDismissed: function(notification, dismiss) {
|
||||
notificationListModel.remove(index)
|
||||
if (dismiss) {
|
||||
notification.dismiss()
|
||||
}
|
||||
console.log("[Notification]: Dismissed Notification:", notification.appName, notification.id, notification.summary, notification.body)
|
||||
// if (dismiss) {
|
||||
// notification.dismiss()
|
||||
// console.log("[NotificationWindow " + Hyprland.monitorFor(screen).activeWorkspace.id + "]: Dissmiss: " + notification.appName + " " + notification.id + " - " + notification.summary)
|
||||
// }
|
||||
console.log("[NotificationWindow " + Hyprland.monitorFor(screen).activeWorkspace.id + "]: Close: " + notification.appName + " " + notification.id + " - " + notification.summary)
|
||||
}
|
||||
}
|
||||
onItemAdded: updateContentSize()
|
||||
@@ -92,14 +95,4 @@ PanelWindow {
|
||||
contentHeight = height
|
||||
console.log("[updateContentSize] contentWidth:", contentWidth, "contentHeight:", contentHeight)
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log(
|
||||
"[Notification]:",
|
||||
NotificationS,
|
||||
"notification:",
|
||||
NotificationS.newestNotification
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user