Compare commits

...
2 changed files with 18 additions and 8 deletions
+17 -7
View File
@@ -42,6 +42,14 @@ Rectangle {
root.dismissed(root.notification, dismiss) root.dismissed(root.notification, dismiss)
} }
Connections {
target: root.notification
function onClosed(reason){
// It is known that it can be triggered twice and delete multiple Index but since it is only temporary display and the chance is low it is ignored
root.closeNotification(false)
}
}
MouseArea { MouseArea {
id: mouseArea id: mouseArea
anchors.fill: parent anchors.fill: parent
@@ -63,14 +71,14 @@ Rectangle {
border.width: Config.border_width border.width: Config.border_width
border.color: textColor border.color: textColor
MouseArea { // covers cross only, not whole row MouseArea {
id: closingMouseArea id: closingMouseArea
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
anchors.margins: Config.spacing // or 10 to match Row margins anchors.margins: Config.spacing
width: closeIconText.height width: closeIconText.implicitHeight + Config.spacing
height: closeIconText.height // Config.screen_height_to_font_small(screen.height) ~12-16 height: closeIconText.implicitHeight + Config.spacing
hoverEnabled: true hoverEnabled: true
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
@@ -91,7 +99,7 @@ Rectangle {
color: parent.parent.containsMouse ? Colors.error_fg : textColor color: parent.parent.containsMouse ? Colors.error_fg : textColor
} }
} }
onClicked: { onClicked: function(mouse){
mouse.accepted=true mouse.accepted=true
root.closeNotification(true) root.closeNotification(true)
} }
@@ -236,7 +244,8 @@ Rectangle {
} }
} }
onClicked: { onClicked: function(mouse){
mouse.accepted=true
modelData.invoke() modelData.invoke()
// resident check is allready in .invoke() // resident check is allready in .invoke()
root.closeNotification(false) root.closeNotification(false)
@@ -317,7 +326,8 @@ Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
} }
} }
onClicked: { onClicked: function(mouse){
mouse.accepted=true;
console.log("[NotificationBodyInlineReply]: Pressed SEND:", inlineReplyTextField.text) console.log("[NotificationBodyInlineReply]: Pressed SEND:", inlineReplyTextField.text)
inlineReplyRectangle.sendReply(inlineReplyTextField.text) inlineReplyRectangle.sendReply(inlineReplyTextField.text)
} }
@@ -86,7 +86,7 @@ Item {
notificationSound.play() notificationSound.play()
} }
// destroy() destroy()
} }
} }
} }