Fix reply popup rendering on newer qt

This commit is contained in:
Nicolas Werner 2026-02-21 00:43:33 +01:00
parent 014d70fd64
commit 51da48c706
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -64,16 +64,17 @@ AbstractButton {
height: r.limitHeight ? Math.min( timelineEvent.main?.height, timelineView.height / 10) + Nheko.paddingSmall + usernameBtn.height : undefined height: r.limitHeight ? Math.min( timelineEvent.main?.height, timelineView.height / 10) + Nheko.paddingSmall + usernameBtn.height : undefined
// FIXME: I have no idea, why this name doesn't render in the reply popup on Qt 6.9.2
AbstractButton { AbstractButton {
id: usernameBtn id: usernameBtn
visible: r.eventId
contentItem: Label { contentItem: Label {
visible: r.eventId
id: userName_ id: userName_
text: r.userName // HACK: To ensure the username gets rendered in Qt 6.9.2,
// we need to always have some text in here. The name
// should never be empty, since it falls to the mxid, but
// if we have no text there, Qt culls the item, before we
// fill it...
text: r.userName || "."
color: r.userColor color: r.userColor
textFormat: Text.RichText textFormat: Text.RichText
width: timelineEvent.main?.width width: timelineEvent.main?.width