Add highlight effect on mentioned messages

This commit is contained in:
Carl Schwan
2020-11-26 10:20:55 +00:00
parent 48c17798b7
commit e838f7423d
2 changed files with 3 additions and 3 deletions

View File

@@ -140,8 +140,8 @@ RowLayout {
}
background: Rectangle {
Kirigami.Theme.colorSet: Kirigami.Theme.Window
color: Kirigami.Theme.backgroundColor
opacity: controlContainer.hovered ? 1 : 0
color: !model.isHighlighted ? Kirigami.Theme.backgroundColor : Kirigami.Theme.positiveBackgroundColor
opacity: controlContainer.hovered || model.isHighlighted ? 1 : 0
}
}
}

View File

@@ -33,7 +33,7 @@ QHash<int, QByteArray> MessageEventModel::roleNames() const
roles[AuthorRole] = "author";
roles[ContentRole] = "content";
roles[ContentTypeRole] = "contentType";
roles[HighlightRole] = "highlight";
roles[HighlightRole] = "isHighlighted";
roles[ReadMarkerRole] = "readMarker";
roles[SpecialMarksRole] = "marks";
roles[LongOperationRole] = "progressInfo";