feat: add screen height to font functions in Config. Added actions, inline Reply and urgency to NotificationBody
This commit is contained in:
@@ -10,6 +10,8 @@ PanelWindow {
|
||||
|
||||
id: notificationWindow
|
||||
|
||||
focusable: true
|
||||
|
||||
anchors.top: true
|
||||
anchors.left: true
|
||||
|
||||
@@ -31,7 +33,7 @@ PanelWindow {
|
||||
if (!NotificationS.correctMonitor(screen))
|
||||
return
|
||||
if (NotificationS.correctMonitor(screen)) {
|
||||
console.log("[NotificationWindow " + Hyprland.monitorFor(screen).activeWorkspace.id + "]: This notification belongs to me! ")
|
||||
Config.debug == "Notification" && console.log("[NotificationWindow " + Hyprland.monitorFor(screen).activeWorkspace.id + "]: This notification belongs to me! ")
|
||||
notificationListModel.append({notificationData: notification})
|
||||
}
|
||||
}
|
||||
@@ -61,12 +63,17 @@ PanelWindow {
|
||||
notification: notificationData
|
||||
|
||||
onDismissed: function(notification, dismiss) {
|
||||
notificationListModel.remove(index)
|
||||
// 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)
|
||||
const appName = notification.appName
|
||||
const id = notification.id
|
||||
const summary = notification.summary
|
||||
if (dismiss) {
|
||||
Config.debug == "Notification" && console.log("[NotificationWindow " + Hyprland.monitorFor(screen).activeWorkspace.id + "]: Dissmiss: " + appName + " " + id + " - " + summary)
|
||||
notification.dismiss()
|
||||
notificationListModel.remove(index)
|
||||
} else {
|
||||
Config.debug == "Notification" && console.log("[NotificationWindow " + Hyprland.monitorFor(screen).activeWorkspace.id + "]: Close: " + appName + " " + id + " - " + summary)
|
||||
notificationListModel.remove(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
onItemAdded: updateContentSize()
|
||||
@@ -93,6 +100,6 @@ PanelWindow {
|
||||
|
||||
contentWidth = width
|
||||
contentHeight = height
|
||||
console.log("[updateContentSize] contentWidth:", contentWidth, "contentHeight:", contentHeight)
|
||||
Config.debug == "Notification" && console.log("[updateContentSize] contentWidth:", contentWidth, "contentHeight:", contentHeight)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user