From 81bbfce7cd2d0d0d6c72058031f4cb198c270333 Mon Sep 17 00:00:00 2001 From: James Graham Date: Tue, 4 Oct 2022 18:15:15 +0000 Subject: [PATCH] Fix bubble header in right to left mode Convert to rowLayout so that the bubble header works in right to left mode. Before ![bubble_header_righttoleft_before](/uploads/91d9b5e41a7f84f8ab2750d1193ed4b6/bubble_header_righttoleft_before.png) After ![bubble_header_righttoleft_after](/uploads/abf8018cf9e103f3d32dfb686efa946f/bubble_header_righttoleft_after.png) --- .../Component/Timeline/TimelineContainer.qml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/imports/NeoChat/Component/Timeline/TimelineContainer.qml b/imports/NeoChat/Component/Timeline/TimelineContainer.qml index 115f02cc6..29289c32e 100644 --- a/imports/NeoChat/Component/Timeline/TimelineContainer.qml +++ b/imports/NeoChat/Component/Timeline/TimelineContainer.qml @@ -206,20 +206,16 @@ QQC2.ItemDelegate { contentItem: ColumnLayout { id: column spacing: Kirigami.Units.smallSpacing - Item { + RowLayout { id: rowLayout + + spacing: Kirigami.Units.smallSpacing visible: model.showAuthor && !isEmote - Layout.fillWidth: true - Layout.preferredWidth: nameLabel.implicitWidth + timeLabel.implicitWidth - Layout.maximumWidth: contentMaxWidth - implicitHeight: visible ? nameLabel.implicitHeight : 0 QQC2.Label { id: nameLabel - topInset: 0 - visible: model.showAuthor && !isEmote - width: Math.min(contentMaxWidth - timeLabel.width, implicitWidth) + Layout.maximumWidth: contentMaxWidth - timeLabel.implicitWidth - rowLayout.spacing text: visible ? author.displayName : "" textFormat: Text.PlainText @@ -242,9 +238,7 @@ QQC2.ItemDelegate { } QQC2.Label { id: timeLabel - leftPadding: Kirigami.Units.largeSpacing - anchors.left: nameLabel.right - visible: model.showAuthor && !isEmote + text: visible ? time.toLocaleTimeString(Qt.locale(), Locale.ShortFormat) : "" color: Kirigami.Theme.disabledTextColor QQC2.ToolTip.visible: hoverHandler.hovered