Debian Codegraph @

debian/patches/020250914~2769642.patch

raw symbols SCIP
1 Description: fix most reply rendering issues with qt 6.9.2
2 Author: Nicolas Werner <[email protected]>
3 Origin: upstream, https://github.com/Nheko-Reborn/nheko/commit/2769642
4 Last-Update: 2025-09-24
5 ---
6 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
7 --- a/resources/qml/TimelineBubbleMessageStyle.qml
8 +++ b/resources/qml/TimelineBubbleMessageStyle.qml
9 @@ -210,9 +210,10 @@
10
11 AbstractButton {
12 id: replyRow
13 - visible: wrapper.reply
14 + visible: wrapper.replyTo
15 +
16 + leftPadding: Nheko.paddingSmall + 4
17
18 - height: replyLine.height
19 anchors.left: parent.left
20 anchors.right: parent.right
21
22 @@ -225,19 +226,7 @@
23 cursorShape: Qt.PointingHandCursor
24 }
25
26 - contentItem: Row {
27 - id: replyRowLay
28 -
29 - spacing: Nheko.paddingSmall
30 -
31 - Rectangle {
32 - id: replyLine
33 - height: Math.min( wrapper.reply?.height, timelineView.height / 10) + Nheko.paddingSmall + replyUserButton.height
34 - color: replyRow.userColor
35 - width: 4
36 - }
37 -
38 - Column {
39 + contentItem: Column {
40 spacing: 0
41
42 id: replyCol
43 @@ -247,7 +236,7 @@
44
45 contentItem: Label {
46 id: userName_
47 - text: wrapper.reply?.userName ?? ''
48 + text: wrapper.reply?.userName ?? 'missing name'
49 color: replyRow.userColor
50 textFormat: Text.RichText
51 width: wrapper.maxWidth
52 @@ -259,12 +248,20 @@
53 replyUserButton,
54 wrapper.reply,
55 ]
56 - }
57 }
58
59 background: Rectangle {
60 //width: replyRow.implicitContentWidth
61 color: Qt.tint(palette.base, Qt.hsla(replyRow.userColor.hslHue, 0.5, replyRow.userColor.hslLightness, 0.1))
62 + Rectangle {
63 + anchors.top: parent.top
64 + anchors.bottom: parent.bottom
65 + anchors.left: parent.left
66 +
67 + id: replyLine
68 + color: replyRow.userColor
69 + width: 4
70 + }
71 }
72
73 onClicked: {
74 --- a/resources/qml/TimelineDefaultMessageStyle.qml
75 +++ b/resources/qml/TimelineDefaultMessageStyle.qml
76 @@ -192,9 +192,9 @@
77
78 AbstractButton {
79 id: replyRow
80 - visible: wrapper.reply
81 + visible: wrapper.replyTo
82
83 - height: replyLine.height
84 + leftPadding: Nheko.paddingSmall + 4
85
86 property color userColor: TimelineManager.userColor(wrapper.reply?.userId ?? '', palette.base)
87
88 @@ -205,19 +205,7 @@
89 cursorShape: Qt.PointingHandCursor
90 }
91
92 - contentItem: Row {
93 - id: replyRowLay
94 -
95 - spacing: Nheko.paddingSmall
96 -
97 - Rectangle {
98 - id: replyLine
99 - height: Math.min( wrapper.reply?.height, timelineView.height / 10) + Nheko.paddingSmall + replyUserButton.height
100 - color: replyRow.userColor
101 - width: 4
102 - }
103 -
104 - Column {
105 + contentItem: Column {
106 spacing: 0
107
108 id: replyCol
109 @@ -227,7 +215,7 @@
110
111 contentItem: Label {
112 id: userName_
113 - text: wrapper.reply?.userName ?? ''
114 + text: wrapper.reply?.userName ?? 'missing name'
115 color: replyRow.userColor
116 textFormat: Text.RichText
117 width: wrapper.maxWidth
118 @@ -239,12 +227,20 @@
119 replyUserButton,
120 wrapper.reply,
121 ]
122 - }
123 }
124
125 background: Rectangle {
126 - //width: replyRow.implicitContentWidth
127 color: Qt.tint(palette.base, Qt.hsla(replyRow.userColor.hslHue, 0.5, replyRow.userColor.hslLightness, 0.1))
128 +
129 + Rectangle {
130 + anchors.top: parent.top
131 + anchors.bottom: parent.bottom
132 + anchors.left: parent.left
133 +
134 + id: replyLine
135 + color: replyRow.userColor
136 + width: 4
137 + }
138 }
139
140 onClicked: {
141 --- a/resources/qml/TopBar.qml
142 +++ b/resources/qml/TopBar.qml
143 @@ -312,7 +312,7 @@
144 ImageButton {
145 id: deletePinButton
146
147 - Layout.alignment: Qt.AlignTop | Qt.AlignLeft
148 + Layout.alignment: Qt.AlignTop | Qt.AlignRight
149 Layout.preferredHeight: 16
150 Layout.preferredWidth: 16
151 ToolTip.text: qsTr("Unpin")
152 --- a/resources/qml/delegates/Reply.qml
153 +++ b/resources/qml/delegates/Reply.qml
154 @@ -5,6 +5,7 @@
155 import QtQuick
156 import QtQuick.Controls
157 import QtQuick.Window
158 +import QtQuick.Layouts
159 import im.nheko
160 import "../"
161
162 @@ -21,7 +22,11 @@
163 property string userId: eventId ? room.dataById(eventId, Room.UserId, "") : ""
164 property string userName: eventId ? room.dataById(eventId, Room.UserName, "") : ""
165 implicitHeight: replyContainer.height
166 - implicitWidth: replyContainer.implicitWidth
167 + implicitWidth: replyContainer.implicitWidth + leftPadding + rightPadding
168 +
169 + leftPadding: 4 + Nheko.paddingSmall
170 + rightPadding: Nheko.paddingSmall
171 +
172 required property int maxWidth
173 property bool limitHeight: false
174
175 @@ -31,14 +36,14 @@
176 }
177
178 onClicked: {
179 - let link = reply.child.linkAt != undefined && reply.child.linkAt(pressX-colorline.width, pressY - userName_.implicitHeight);
180 + let link = timelineEvent.main.linkAt != undefined && timelineEvent.main.linkAt(pressX-colorline.width, pressY - userName_.implicitHeight);
181 if (link) {
182 Nheko.openLink(link)
183 } else {
184 room.showEvent(r.eventId)
185 }
186 }
187 - onPressAndHold: replyContextMenu.show(reply.child.copyText, reply.child.linkAt(pressX-colorline.width, pressY - userName_.implicitHeight), r.eventId)
188 + onPressAndHold: replyContextMenu.show(timelineEvent.main.copyText, timelineEvent.main.linkAt(pressX-colorline.width, pressY - userName_.implicitHeight), r.eventId)
189
190 contentItem: TimelineEvent {
191 id: timelineEvent
192 @@ -51,49 +56,36 @@
193 maxWidth: r.maxWidth
194 limitAsReply: r.limitHeight
195
196 - //height: replyContainer.implicitHeight
197 - data: Row {
198 + data: Column {
199 id: replyContainer
200 -
201 - spacing: Nheko.paddingSmall
202 + spacing: 0
203
204 clip: r.limitHeight
205
206 height: r.limitHeight ? Math.min( timelineEvent.main?.height, timelineView.height / 10) + Nheko.paddingSmall + usernameBtn.height : undefined
207
208 - Rectangle {
209 - id: colorline
210 -
211 - width: 4
212 - height: content.height
213 -
214 - color: TimelineManager.userColor(r.userId, palette.base)
215 - }
216 -
217 - Column {
218 - id: content
219 - spacing: 0
220 -
221 - AbstractButton {
222 - id: usernameBtn
223 -
224 -
225 - contentItem: Label {
226 - id: userName_
227 - text: r.userName
228 - color: r.userColor
229 - textFormat: Text.RichText
230 - width: timelineEvent.main?.width
231 - }
232 - onClicked: room.openUserProfile(r.userId)
233 + // FIXME: I have no idea, why this name doesn't render in the reply popup on Qt 6.9.2
234 + AbstractButton {
235 + id: usernameBtn
236 +
237 + visible: r.eventId
238 +
239 + contentItem: Label {
240 + visible: r.eventId
241 + id: userName_
242 + text: r.userName
243 + color: r.userColor
244 + textFormat: Text.RichText
245 + width: timelineEvent.main?.width
246 }
247 -
248 - data: [
249 - usernameBtn, timelineEvent.main,
250 - ]
251 + onClicked: room.openUserProfile(r.userId)
252 }
253
254 + data: [
255 + usernameBtn, timelineEvent.main,
256 + ]
257 }
258 +
259 }
260
261 background: Rectangle {
262 @@ -103,6 +95,16 @@
263 property color userColor: TimelineManager.userColor(r.userId, palette.base)
264 property color bgColor: palette.base
265 color: Qt.tint(bgColor, Qt.hsla(userColor.hslHue, 0.5, userColor.hslLightness, 0.1))
266 +
267 + Rectangle {
268 + anchors.top: parent.top
269 + anchors.bottom: parent.bottom
270 + anchors.left: parent.left
271 +
272 + id: colorline
273 + color: backgroundItem.userColor
274 + width: 4
275 + }
276 }
277
278 }