Fix bubble header in right to left mode
Convert to rowLayout so that the bubble header works in right to left mode. Before  After 
This commit is contained in:
@@ -206,20 +206,16 @@ QQC2.ItemDelegate {
|
|||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
id: column
|
id: column
|
||||||
spacing: Kirigami.Units.smallSpacing
|
spacing: Kirigami.Units.smallSpacing
|
||||||
Item {
|
RowLayout {
|
||||||
id: rowLayout
|
id: rowLayout
|
||||||
|
|
||||||
|
spacing: Kirigami.Units.smallSpacing
|
||||||
visible: model.showAuthor && !isEmote
|
visible: model.showAuthor && !isEmote
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredWidth: nameLabel.implicitWidth + timeLabel.implicitWidth
|
|
||||||
Layout.maximumWidth: contentMaxWidth
|
|
||||||
implicitHeight: visible ? nameLabel.implicitHeight : 0
|
|
||||||
|
|
||||||
QQC2.Label {
|
QQC2.Label {
|
||||||
id: nameLabel
|
id: nameLabel
|
||||||
topInset: 0
|
|
||||||
|
|
||||||
visible: model.showAuthor && !isEmote
|
Layout.maximumWidth: contentMaxWidth - timeLabel.implicitWidth - rowLayout.spacing
|
||||||
width: Math.min(contentMaxWidth - timeLabel.width, implicitWidth)
|
|
||||||
|
|
||||||
text: visible ? author.displayName : ""
|
text: visible ? author.displayName : ""
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
@@ -242,9 +238,7 @@ QQC2.ItemDelegate {
|
|||||||
}
|
}
|
||||||
QQC2.Label {
|
QQC2.Label {
|
||||||
id: timeLabel
|
id: timeLabel
|
||||||
leftPadding: Kirigami.Units.largeSpacing
|
|
||||||
anchors.left: nameLabel.right
|
|
||||||
visible: model.showAuthor && !isEmote
|
|
||||||
text: visible ? time.toLocaleTimeString(Qt.locale(), Locale.ShortFormat) : ""
|
text: visible ? time.toLocaleTimeString(Qt.locale(), Locale.ShortFormat) : ""
|
||||||
color: Kirigami.Theme.disabledTextColor
|
color: Kirigami.Theme.disabledTextColor
|
||||||
QQC2.ToolTip.visible: hoverHandler.hovered
|
QQC2.ToolTip.visible: hoverHandler.hovered
|
||||||
|
|||||||
Reference in New Issue
Block a user