From 9a87a0e0c61c0e2aa1b31cb704a74ff381aad8f5 Mon Sep 17 00:00:00 2001
From: Nicolas Werner <nicolas.werner@hotmail.de>
Date: Fri, 22 Dec 2023 02:59:16 +0100
Subject: [PATCH] Fix red outline alignment in default style

---
 resources/qml/TimelineDefaultMessageStyle.qml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/resources/qml/TimelineDefaultMessageStyle.qml b/resources/qml/TimelineDefaultMessageStyle.qml
index e9b52e931..661aabdc4 100644
--- a/resources/qml/TimelineDefaultMessageStyle.qml
+++ b/resources/qml/TimelineDefaultMessageStyle.qml
@@ -130,13 +130,13 @@ TimelineEvent {
             anchors.top: gridContainer.top
             anchors.left: gridContainer.left 
             anchors.topMargin: -2
-            anchors.leftMargin: -2
+            anchors.leftMargin: -2 + (stateEventSpacing.visible ? (stateEventSpacing.width + gridContainer.spacing) : 0)
             color: "transparent"
             border.color: Nheko.theme.red
             border.width: wrapper.notificationlevel == MtxEvent.Highlight ? 1 : 0
             radius: 4
             height: contentColumn.implicitHeight + 4
-            width: contentColumn.implicitWidth + 4
+            width: contentColumn.implicitWidth + 4 + (wrapper.threadId ? (4 + gridContainer.spacing) : 0)
         },
         Row {
             id: gridContainer
@@ -181,6 +181,7 @@ TimelineEvent {
             }
 
             Item {
+                id: stateEventSpacing
                 visible: wrapper.isStateEvent
                 width: (wrapper.maxWidth - (wrapper.main?.width ?? 0)) / 2
                 height: 1
-- 
GitLab