Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 104038d507 | |||
|
|
2b41b49d7b | ||
| 22d413056c | |||
|
|
e268347380 | ||
| 1aa2073420 | |||
| f67ab7756d |
290
fix_reply_rendering.patch
Normal file
290
fix_reply_rendering.patch
Normal file
@@ -0,0 +1,290 @@
|
||||
From 2769642d3c7bd3c0d830b2f18ef6b3bf6a710bf4 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Werner <nicolas.werner@hotmail.de>
|
||||
Date: Sun, 14 Sep 2025 23:43:20 +0200
|
||||
Subject: [PATCH] Fix most reply rendering issues with qt 6.9.2
|
||||
|
||||
---
|
||||
resources/qml/TimelineBubbleMessageStyle.qml | 31 ++++----
|
||||
resources/qml/TimelineDefaultMessageStyle.qml | 32 ++++-----
|
||||
resources/qml/TopBar.qml | 2 +-
|
||||
resources/qml/delegates/Reply.qml | 70 ++++++++++---------
|
||||
4 files changed, 65 insertions(+), 70 deletions(-)
|
||||
|
||||
diff --git a/resources/qml/TimelineBubbleMessageStyle.qml b/resources/qml/TimelineBubbleMessageStyle.qml
|
||||
index 560cb1338..722718bc4 100644
|
||||
--- a/resources/qml/TimelineBubbleMessageStyle.qml
|
||||
+++ b/resources/qml/TimelineBubbleMessageStyle.qml
|
||||
@@ -210,9 +210,10 @@ TimelineEvent {
|
||||
|
||||
AbstractButton {
|
||||
id: replyRow
|
||||
- visible: wrapper.reply
|
||||
+ visible: wrapper.replyTo
|
||||
+
|
||||
+ leftPadding: Nheko.paddingSmall + 4
|
||||
|
||||
- height: replyLine.height
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
@@ -225,19 +226,7 @@ TimelineEvent {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
|
||||
- contentItem: Row {
|
||||
- id: replyRowLay
|
||||
-
|
||||
- spacing: Nheko.paddingSmall
|
||||
-
|
||||
- Rectangle {
|
||||
- id: replyLine
|
||||
- height: Math.min( wrapper.reply?.height, timelineView.height / 10) + Nheko.paddingSmall + replyUserButton.height
|
||||
- color: replyRow.userColor
|
||||
- width: 4
|
||||
- }
|
||||
-
|
||||
- Column {
|
||||
+ contentItem: Column {
|
||||
spacing: 0
|
||||
|
||||
id: replyCol
|
||||
@@ -247,7 +236,7 @@ TimelineEvent {
|
||||
|
||||
contentItem: Label {
|
||||
id: userName_
|
||||
- text: wrapper.reply?.userName ?? ''
|
||||
+ text: wrapper.reply?.userName ?? 'missing name'
|
||||
color: replyRow.userColor
|
||||
textFormat: Text.RichText
|
||||
width: wrapper.maxWidth
|
||||
@@ -259,12 +248,20 @@ TimelineEvent {
|
||||
replyUserButton,
|
||||
wrapper.reply,
|
||||
]
|
||||
- }
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
//width: replyRow.implicitContentWidth
|
||||
color: Qt.tint(palette.base, Qt.hsla(replyRow.userColor.hslHue, 0.5, replyRow.userColor.hslLightness, 0.1))
|
||||
+ Rectangle {
|
||||
+ anchors.top: parent.top
|
||||
+ anchors.bottom: parent.bottom
|
||||
+ anchors.left: parent.left
|
||||
+
|
||||
+ id: replyLine
|
||||
+ color: replyRow.userColor
|
||||
+ width: 4
|
||||
+ }
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
diff --git a/resources/qml/TimelineDefaultMessageStyle.qml b/resources/qml/TimelineDefaultMessageStyle.qml
|
||||
index 2bc0171a8..49454ac0b 100644
|
||||
--- a/resources/qml/TimelineDefaultMessageStyle.qml
|
||||
+++ b/resources/qml/TimelineDefaultMessageStyle.qml
|
||||
@@ -192,9 +192,9 @@ TimelineEvent {
|
||||
|
||||
AbstractButton {
|
||||
id: replyRow
|
||||
- visible: wrapper.reply
|
||||
+ visible: wrapper.replyTo
|
||||
|
||||
- height: replyLine.height
|
||||
+ leftPadding: Nheko.paddingSmall + 4
|
||||
|
||||
property color userColor: TimelineManager.userColor(wrapper.reply?.userId ?? '', palette.base)
|
||||
|
||||
@@ -205,19 +205,7 @@ TimelineEvent {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
|
||||
- contentItem: Row {
|
||||
- id: replyRowLay
|
||||
-
|
||||
- spacing: Nheko.paddingSmall
|
||||
-
|
||||
- Rectangle {
|
||||
- id: replyLine
|
||||
- height: Math.min( wrapper.reply?.height, timelineView.height / 10) + Nheko.paddingSmall + replyUserButton.height
|
||||
- color: replyRow.userColor
|
||||
- width: 4
|
||||
- }
|
||||
-
|
||||
- Column {
|
||||
+ contentItem: Column {
|
||||
spacing: 0
|
||||
|
||||
id: replyCol
|
||||
@@ -227,7 +215,7 @@ TimelineEvent {
|
||||
|
||||
contentItem: Label {
|
||||
id: userName_
|
||||
- text: wrapper.reply?.userName ?? ''
|
||||
+ text: wrapper.reply?.userName ?? 'missing name'
|
||||
color: replyRow.userColor
|
||||
textFormat: Text.RichText
|
||||
width: wrapper.maxWidth
|
||||
@@ -239,12 +227,20 @@ TimelineEvent {
|
||||
replyUserButton,
|
||||
wrapper.reply,
|
||||
]
|
||||
- }
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
- //width: replyRow.implicitContentWidth
|
||||
color: Qt.tint(palette.base, Qt.hsla(replyRow.userColor.hslHue, 0.5, replyRow.userColor.hslLightness, 0.1))
|
||||
+
|
||||
+ Rectangle {
|
||||
+ anchors.top: parent.top
|
||||
+ anchors.bottom: parent.bottom
|
||||
+ anchors.left: parent.left
|
||||
+
|
||||
+ id: replyLine
|
||||
+ color: replyRow.userColor
|
||||
+ width: 4
|
||||
+ }
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
diff --git a/resources/qml/TopBar.qml b/resources/qml/TopBar.qml
|
||||
index 900e59e8b..cd20e94ec 100644
|
||||
--- a/resources/qml/TopBar.qml
|
||||
+++ b/resources/qml/TopBar.qml
|
||||
@@ -330,7 +330,7 @@ Pane {
|
||||
ImageButton {
|
||||
id: deletePinButton
|
||||
|
||||
- Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||
+ Layout.alignment: Qt.AlignTop | Qt.AlignRight
|
||||
Layout.preferredHeight: 16
|
||||
Layout.preferredWidth: 16
|
||||
ToolTip.text: qsTr("Unpin")
|
||||
diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml
|
||||
index 7ee2a0a14..77cad0f0a 100644
|
||||
--- a/resources/qml/delegates/Reply.qml
|
||||
+++ b/resources/qml/delegates/Reply.qml
|
||||
@@ -5,6 +5,7 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Window
|
||||
+import QtQuick.Layouts
|
||||
import im.nheko
|
||||
import "../"
|
||||
|
||||
@@ -21,7 +22,11 @@ AbstractButton {
|
||||
property string userId: eventId ? room.dataById(eventId, Room.UserId, "") : ""
|
||||
property string userName: eventId ? room.dataById(eventId, Room.UserName, "") : ""
|
||||
implicitHeight: replyContainer.height
|
||||
- implicitWidth: replyContainer.implicitWidth
|
||||
+ implicitWidth: replyContainer.implicitWidth + leftPadding + rightPadding
|
||||
+
|
||||
+ leftPadding: 4 + Nheko.paddingSmall
|
||||
+ rightPadding: Nheko.paddingSmall
|
||||
+
|
||||
required property int maxWidth
|
||||
property bool limitHeight: false
|
||||
|
||||
@@ -31,14 +36,14 @@ AbstractButton {
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
- let link = reply.child.linkAt != undefined && reply.child.linkAt(pressX-colorline.width, pressY - userName_.implicitHeight);
|
||||
+ let link = timelineEvent.main.linkAt != undefined && timelineEvent.main.linkAt(pressX-colorline.width, pressY - userName_.implicitHeight);
|
||||
if (link) {
|
||||
Nheko.openLink(link)
|
||||
} else {
|
||||
room.showEvent(r.eventId)
|
||||
}
|
||||
}
|
||||
- onPressAndHold: replyContextMenu.show(reply.child.copyText, reply.child.linkAt(pressX-colorline.width, pressY - userName_.implicitHeight), r.eventId)
|
||||
+ onPressAndHold: replyContextMenu.show(timelineEvent.main.copyText, timelineEvent.main.linkAt(pressX-colorline.width, pressY - userName_.implicitHeight), r.eventId)
|
||||
|
||||
contentItem: TimelineEvent {
|
||||
id: timelineEvent
|
||||
@@ -51,49 +56,36 @@ AbstractButton {
|
||||
maxWidth: r.maxWidth
|
||||
limitAsReply: r.limitHeight
|
||||
|
||||
- //height: replyContainer.implicitHeight
|
||||
- data: Row {
|
||||
+ data: Column {
|
||||
id: replyContainer
|
||||
-
|
||||
- spacing: Nheko.paddingSmall
|
||||
+ spacing: 0
|
||||
|
||||
clip: r.limitHeight
|
||||
|
||||
height: r.limitHeight ? Math.min( timelineEvent.main?.height, timelineView.height / 10) + Nheko.paddingSmall + usernameBtn.height : undefined
|
||||
|
||||
- Rectangle {
|
||||
- id: colorline
|
||||
-
|
||||
- width: 4
|
||||
- height: content.height
|
||||
-
|
||||
- color: TimelineManager.userColor(r.userId, palette.base)
|
||||
- }
|
||||
-
|
||||
- Column {
|
||||
- id: content
|
||||
- spacing: 0
|
||||
+ // FIXME: I have no idea, why this name doesn't render in the reply popup on Qt 6.9.2
|
||||
+ AbstractButton {
|
||||
+ id: usernameBtn
|
||||
|
||||
- AbstractButton {
|
||||
- id: usernameBtn
|
||||
+ visible: r.eventId
|
||||
|
||||
-
|
||||
- contentItem: Label {
|
||||
- id: userName_
|
||||
- text: r.userName
|
||||
- color: r.userColor
|
||||
- textFormat: Text.RichText
|
||||
- width: timelineEvent.main?.width
|
||||
- }
|
||||
- onClicked: room.openUserProfile(r.userId)
|
||||
+ contentItem: Label {
|
||||
+ visible: r.eventId
|
||||
+ id: userName_
|
||||
+ text: r.userName
|
||||
+ color: r.userColor
|
||||
+ textFormat: Text.RichText
|
||||
+ width: timelineEvent.main?.width
|
||||
}
|
||||
-
|
||||
- data: [
|
||||
- usernameBtn, timelineEvent.main,
|
||||
- ]
|
||||
+ onClicked: room.openUserProfile(r.userId)
|
||||
}
|
||||
|
||||
+ data: [
|
||||
+ usernameBtn, timelineEvent.main,
|
||||
+ ]
|
||||
}
|
||||
+
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
@@ -103,6 +95,16 @@ AbstractButton {
|
||||
property color userColor: TimelineManager.userColor(r.userId, palette.base)
|
||||
property color bgColor: palette.base
|
||||
color: Qt.tint(bgColor, Qt.hsla(userColor.hslHue, 0.5, userColor.hslLightness, 0.1))
|
||||
+
|
||||
+ Rectangle {
|
||||
+ anchors.top: parent.top
|
||||
+ anchors.bottom: parent.bottom
|
||||
+ anchors.left: parent.left
|
||||
+
|
||||
+ id: colorline
|
||||
+ color: backgroundItem.userColor
|
||||
+ width: 4
|
||||
+ }
|
||||
}
|
||||
|
||||
}
|
||||
39
nheko-qt610.patch
Normal file
39
nheko-qt610.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From af2ca72030deb14a920a888e807dc732d93e3714 Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Becker <mail@heiko-becker.de>
|
||||
Date: Thu, 4 Sep 2025 17:29:17 +0200
|
||||
Subject: [PATCH] Search for private modules with Qt 6.10
|
||||
|
||||
Usage of private Qt modules requires a call to
|
||||
|
||||
`find_package(Qt6 COMPONENTS FooPrivate)` since 6.10 [1].
|
||||
|
||||
The build complains about
|
||||
|
||||
'CMake Error at CMakeLists.txt:909 (target_link_libraries):
|
||||
Target "nheko" links to:
|
||||
|
||||
Qt::QmlPrivate
|
||||
|
||||
but the target was not found.'
|
||||
|
||||
otherwise.
|
||||
|
||||
[1] https://doc-snapshots.qt.io/qt6-dev/whatsnew610.html#build-system-changes
|
||||
---
|
||||
CMakeLists.txt | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8c0854174..3476f51ae 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -247,6 +247,9 @@ endif()
|
||||
# Discover Qt dependencies.
|
||||
#
|
||||
find_package(Qt6 6.5 COMPONENTS Core Widgets Gui LinguistTools Svg Multimedia Qml QuickControls2 REQUIRED)
|
||||
+if (Qt6Qml_VERSION VERSION_GREATER_EQUAL "6.10.0")
|
||||
+ find_package(Qt6 REQUIRED COMPONENTS GuiPrivate QmlPrivate)
|
||||
+endif()
|
||||
find_package(Qt6DBus)
|
||||
|
||||
if(USE_BUNDLED_QTKEYCHAIN)
|
||||
@@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 13 19:49:55 UTC 2025 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
- Add upstream change:
|
||||
* nheko-qt610.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 24 11:32:18 CEST 2025 - aschnell@suse.com
|
||||
|
||||
- libboost_system was removed upstream (bsc#1249900)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 23 10:46:14 UTC 2025 - Dominik Heidler <dheidler@suse.de>
|
||||
|
||||
- Backport fix_reply_rendering.patch for fixing reply renderig
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 11 09:42:19 UTC 2025 - Martin Sirringhaus <martin.sirringhaus@suse.com>
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ Group: Productivity/Networking/Talk/Clients
|
||||
URL: https://github.com/Nheko-Reborn/%{name}
|
||||
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch0: fix_scrolling.patch
|
||||
Patch1: fix_reply_rendering.patch
|
||||
# PATCH-FIX-UPSTREAM -- Qt 6.10 compat
|
||||
Patch2: nheko-qt610.patch
|
||||
BuildRequires: appstream-glib
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: cmake >= 3.13.0
|
||||
@@ -50,7 +53,9 @@ BuildRequires: libboost_locale-devel
|
||||
BuildRequires: libboost_program_options-devel
|
||||
BuildRequires: libboost_random-devel
|
||||
BuildRequires: libboost_regex-devel
|
||||
%if 0%{?suse_version} < 1600
|
||||
BuildRequires: libboost_system-devel
|
||||
%endif
|
||||
BuildRequires: libboost_thread-devel
|
||||
BuildRequires: lmdb-devel
|
||||
BuildRequires: lmdbxx-devel
|
||||
|
||||
Reference in New Issue
Block a user