summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-02-26 23:43:54 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-02-26 23:43:54 +0100
commit4d79f8078e4883f268ee12bb5db5873bb694e30d (patch)
tree0678c09ceb90d59b2c54f5c7ef67016f595f43b3 /resources/qml
parentOnly show reply button and option button on hover (diff)
downloadnheko-4d79f8078e4883f268ee12bb5db5873bb694e30d.tar.xz
Don't let click on reply steal focus from the replied to elements
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/MatrixText.qml3
-rw-r--r--resources/qml/delegates/Reply.qml13
2 files changed, 9 insertions, 7 deletions
diff --git a/resources/qml/MatrixText.qml b/resources/qml/MatrixText.qml
index 560a8108..9a4f7348 100644
--- a/resources/qml/MatrixText.qml
+++ b/resources/qml/MatrixText.qml
@@ -22,7 +22,8 @@ TextEdit {
 	{
 		id: ma
 		anchors.fill: parent
-		onPressed:  mouse.accepted = false
+		propagateComposedEvents: true
+		acceptedButtons: Qt.NoButton
 		cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
 	}
 
diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml
index 8bb9ed38..06804328 100644
--- a/resources/qml/delegates/Reply.qml
+++ b/resources/qml/delegates/Reply.qml
@@ -12,6 +12,13 @@ Rectangle {
 	width: parent.width
 	height: replyContainer.height
 
+	MouseArea {
+		anchors.fill: parent
+		preventStealing: true
+		onClicked: chat.positionViewAtIndex(chat.model.idToIndex(timelineManager.replyingEvent), ListView.Contain)
+		cursorShape: Qt.PointingHandCursor
+	}
+
 	Rectangle {
 		id: colorLine
 
@@ -48,10 +55,4 @@ Rectangle {
 	}
 
 	color: Qt.rgba(userColor.r, userColor.g, userColor.b, 0.2)
-
-	MouseArea {
-		anchors.fill: parent
-		onClicked: chat.positionViewAtIndex(chat.model.idToIndex(timelineManager.replyingEvent), ListView.Contain)
-		cursorShape: Qt.PointingHandCursor
-	}
 }