summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-04-04 20:25:09 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-04-04 20:25:09 +0200
commit7ebf0c00327e97d010a92b697193c4a281fe1e53 (patch)
treee1172f56ca5c64a5a9363572fb1d4224d7a2b5e9
parentGet rid of an edge case, that can break pagination (diff)
downloadnheko-7ebf0c00327e97d010a92b697193c4a281fe1e53.tar.xz
Add a more obvious thread indicator
-rw-r--r--resources/qml/TimelineRow.qml26
1 files changed, 23 insertions, 3 deletions
diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml
index 9a7ac9de..d9deefa0 100644
--- a/resources/qml/TimelineRow.qml
+++ b/resources/qml/TimelineRow.qml
@@ -102,12 +102,32 @@ AbstractButton {
         }
     }
 
+    AbstractButton {
+        anchors.leftMargin: Settings.smallAvatars? 0 : (Nheko.avatarSize + 8) // align bubble with section header
+        anchors.left: parent.left
+        visible: threadId
+        width: 4
+        height: parent.height
+
+        Rectangle {
+            id: threadLine
+
+            color: TimelineManager.userColor(threadId, Nheko.colors.base)
+            anchors.fill: parent
+        }
+
+        ToolTip.visible: hovered
+        ToolTip.delay: Nheko.tooltipDelay
+        ToolTip.text: qsTr("Part of a thread")
+        onClicked: room.thread = threadId
+    }
+
     Rectangle {
         id: row
         property bool bubbleOnRight : isSender && Settings.bubbles
-        anchors.leftMargin: isStateEvent || Settings.smallAvatars? 0 : Nheko.avatarSize+8 // align bubble with section header
-        anchors.left: isStateEvent? undefined : (bubbleOnRight? undefined : parent.left)
-        anchors.right: isStateEvent? undefined: (bubbleOnRight? parent.right : undefined)
+        anchors.leftMargin: (isStateEvent || Settings.smallAvatars? 0 : (Nheko.avatarSize + 8)) + (threadId ? 6 : 0) // align bubble with section header
+        anchors.left: (isStateEvent || bubbleOnRight) ? undefined : parent.left
+        anchors.right: (isStateEvent || !bubbleOnRight) ? undefined : parent.right
         anchors.horizontalCenter: isStateEvent? parent.horizontalCenter : undefined
         property int maxWidth: (parent.width-(Settings.smallAvatars || isStateEvent? 0 : Nheko.avatarSize+8))*(Settings.bubbles && !isStateEvent? 0.9 : 1)
         width: Settings.bubbles? Math.min(maxWidth,Math.max(reply.implicitWidth+8,contentItem.implicitWidth+metadata.width+20)) : maxWidth