2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick 2.12
|
2019-05-13 03:17:42 +10:00
|
|
|
import "../../Base"
|
2019-11-30 20:12:00 +11:00
|
|
|
import "../../utils.js" as Utils
|
2019-05-13 03:17:42 +10:00
|
|
|
|
2019-08-21 18:39:07 +10:00
|
|
|
HTileDelegate {
|
2019-05-13 03:17:42 +10:00
|
|
|
id: memberDelegate
|
2019-12-11 05:57:54 +11:00
|
|
|
backgroundColor: theme.chat.roomPane.member.background
|
2019-05-13 03:17:42 +10:00
|
|
|
|
2019-08-21 18:39:07 +10:00
|
|
|
image: HUserAvatar {
|
|
|
|
userId: model.user_id
|
|
|
|
displayName: model.display_name
|
2019-11-04 04:48:12 +11:00
|
|
|
mxc: model.avatar_url
|
2019-11-30 19:59:02 +11:00
|
|
|
powerLevel: model.power_level
|
2019-12-11 05:57:54 +11:00
|
|
|
shiftPowerIconPosition: ! roomPane.collapsed
|
2019-05-13 03:17:42 +10:00
|
|
|
}
|
2019-08-21 18:39:07 +10:00
|
|
|
|
|
|
|
title.text: model.display_name || model.user_id
|
2019-11-30 20:12:00 +11:00
|
|
|
title.color:
|
|
|
|
memberDelegate.hovered ?
|
|
|
|
Utils.nameColor(model.display_name || model.user_id.substring(1)) :
|
2019-12-11 05:57:54 +11:00
|
|
|
theme.chat.roomPane.member.name
|
2019-08-22 19:42:48 +10:00
|
|
|
|
|
|
|
subtitle.text: model.user_id
|
2019-12-11 05:57:54 +11:00
|
|
|
subtitle.color: theme.chat.roomPane.member.subtitle
|
2019-11-30 20:12:00 +11:00
|
|
|
|
|
|
|
|
|
|
|
Behavior on title.color { HColorAnimation {} }
|
2019-05-13 03:17:42 +10:00
|
|
|
}
|