Color name when highlighting member delegates

This commit is contained in:
miruka 2020-08-21 11:19:42 -04:00
parent 010675001c
commit 044060d1c0
3 changed files with 4 additions and 1 deletions

View File

@ -105,6 +105,7 @@ HListView {
delegate: CompletableUserDelegate {
width: root.width
colorName: hovered || root.currentIndex === model.index
onClicked: {
currentIndex = model.index
root.open = false

View File

@ -11,6 +11,7 @@ import "../../../../PythonBridge"
HTile {
id: member
property bool colorName: hovered
property Future getPresenceFuture: null
backgroundColor: theme.chat.roomPane.listView.member.background
@ -40,7 +41,7 @@ HTile {
TitleLabel {
text: model.display_name || model.id
color:
member.hovered ?
member.colorName ?
utils.nameColor(
model.display_name || model.id.substring(1)
) :

View File

@ -30,6 +30,7 @@ HColumnLayout {
delegate: MemberDelegate {
id: member
width: memberList.width
colorName: hovered || memberList.currentIndex === model.index
onLeftClicked: stackView.push(
"MemberProfile.qml",