Thread alignment

It doesn't make sense for a thread to be on the right or tinted when the local user started it as they contain messages from multiple users. So always make them align left and never tint them.
This commit is contained in:
James Graham
2024-12-25 19:53:41 +00:00
parent 3480c5f067
commit b595a2966c
3 changed files with 13 additions and 6 deletions

View File

@@ -51,6 +51,11 @@ QQC2.Control {
*/
required property var contentModel
/**
* @brief Whether the message in a thread.
*/
required property bool isThreaded
/**
* @brief Whether the bubble background should be shown.
*/
@@ -134,7 +139,7 @@ QQC2.Control {
visible: root.showBackground
Kirigami.Theme.colorSet: Kirigami.Theme.View
Kirigami.Theme.inherit: false
color: if (root.author.isLocalMember) {
color: if (root.author.isLocalMember && !root.isThreaded) {
return Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.backgroundColor, Kirigami.Theme.highlightColor, 0.15);
} else if (root.showHighlight) {
return Kirigami.Theme.positiveBackgroundColor;