fix: fixed some mouseArea stuff and the Connection function

This commit is contained in:
Hannes
2026-08-30 00:26:49 +02:00
parent 4f49575069
commit 47562185f1
+10 -8
View File
@@ -44,7 +44,7 @@ Rectangle {
Connections { Connections {
target: root.notification target: root.notification
onClosed: function(reason){ 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 // 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) root.closeNotification(false)
} }
@@ -71,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
@@ -99,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)
} }
@@ -244,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)
@@ -325,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)
} }