diff --git a/src/qml/Base/HUserAvatar.qml b/src/qml/Base/HUserAvatar.qml index 1ced9fe1..94501230 100644 --- a/src/qml/Base/HUserAvatar.qml +++ b/src/qml/Base/HUserAvatar.qml @@ -7,6 +7,7 @@ HAvatar { property string userId property string displayName property int powerLevel: 0 + property bool shiftPowerIconPosition: true readonly property bool admin: powerLevel >= 100 readonly property bool moderator: powerLevel >= 50 && ! admin @@ -16,10 +17,12 @@ HAvatar { active: admin || moderator anchors.top: parent.top anchors.left: parent.left - anchors.topMargin: -16 / 2 + anchors.topMargin: shiftPowerIconPosition ? -16 / 2 : 0 anchors.leftMargin: anchors.topMargin z: 100 + Behavior on anchors.topMargin { HNumberAnimation {} } + sourceComponent: HIcon { small: true svgName: "user-power-" + (admin ? "100" : "50") diff --git a/src/qml/Chat/RoomSidePane/MemberDelegate.qml b/src/qml/Chat/RoomSidePane/MemberDelegate.qml index 5864fb25..3cd6f89f 100644 --- a/src/qml/Chat/RoomSidePane/MemberDelegate.qml +++ b/src/qml/Chat/RoomSidePane/MemberDelegate.qml @@ -12,6 +12,7 @@ HTileDelegate { displayName: model.display_name mxc: model.avatar_url powerLevel: model.power_level + shiftPowerIconPosition: ! roomSidePane.collapsed } title.text: model.display_name || model.user_id