summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-01-18 20:49:40 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-01-18 21:58:38 +0100
commitbcfa6834682b188ab2a315d74529168d5c3968a6 (patch)
tree97948d86346c54f308daaa693c7e657cc65218ad /resources
parentFix placeholderTextColor not supported below Qt 5.12 (diff)
downloadnheko-bcfa6834682b188ab2a315d74529168d5c3968a6.tar.xz
Improve hover stuff, needs HoverHandler for a proper fix
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/TimelineRow.qml17
-rw-r--r--resources/qml/delegates/Reply.qml2
2 files changed, 11 insertions, 8 deletions
diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml
index 077171c9..17dc2cd7 100644
--- a/resources/qml/TimelineRow.qml
+++ b/resources/qml/TimelineRow.qml
@@ -11,15 +11,23 @@ Item {
     anchors.right: parent.right
     height: row.height
 
+    Rectangle {
+        color: (Settings.messageHoverHighlight && hoverHandler.containsMouse) ? colors.alternateBase : "transparent"
+        anchors.fill: row
+    }
+
     MouseArea {
+        id: hoverHandler
         anchors.fill: parent
         propagateComposedEvents: true
-        preventStealing: true
+        preventStealing: false
         hoverEnabled: true
         acceptedButtons: Qt.AllButtons
         onClicked: {
             if (mouse.button === Qt.RightButton)
-                messageContextMenu.show(model.id, model.type, model.isEncrypted, row);
+            messageContextMenu.show(model.id, model.type, model.isEncrypted, row);
+            else
+            event.accepted = false
 
         }
         onPressAndHold: {
@@ -27,11 +35,6 @@ Item {
         }
     }
 
-    Rectangle {
-        color: (Settings.messageHoverHighlight && parent.containsMouse) ? colors.base : "transparent"
-        anchors.fill: row
-    }
-
     RowLayout {
         id: row
 
diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml
index fe2fe23f..ff1fa657 100644
--- a/resources/qml/delegates/Reply.qml
+++ b/resources/qml/delegates/Reply.qml
@@ -15,7 +15,7 @@ Item {
 
     MouseArea {
         anchors.fill: parent
-        preventStealing: true
+        preventStealing: false
         onClicked: chat.positionViewAtIndex(chat.model.idToIndex(modelData.id), ListView.Contain)
         cursorShape: Qt.PointingHandCursor
     }