mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Added discrete edit button to room profiles.
This commit is contained in:
parent
63339ad632
commit
b94689c4d1
1 changed files with 16 additions and 2 deletions
|
@ -49,6 +49,8 @@ ApplicationWindow {
|
||||||
spacing: Nheko.paddingMedium
|
spacing: Nheko.paddingMedium
|
||||||
|
|
||||||
Avatar {
|
Avatar {
|
||||||
|
id: displayAvatar
|
||||||
|
|
||||||
Layout.topMargin: Nheko.paddingMedium
|
Layout.topMargin: Nheko.paddingMedium
|
||||||
url: roomSettings.roomAvatarUrl.replace("mxc://", "image://MxcImage/")
|
url: roomSettings.roomAvatarUrl.replace("mxc://", "image://MxcImage/")
|
||||||
roomid: roomSettings.roomId
|
roomid: roomSettings.roomId
|
||||||
|
@ -56,9 +58,21 @@ ApplicationWindow {
|
||||||
height: 130
|
height: 130
|
||||||
width: 130
|
width: 130
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
onClicked: {
|
onClicked: TimelineManager.openImageOverlay(null, roomSettings.roomAvatarUrl, "", 0, 0)
|
||||||
if (roomSettings.canChangeAvatar)
|
|
||||||
|
ImageButton {
|
||||||
|
hoverEnabled: true
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: qsTr("Change room avatar.")
|
||||||
|
anchors.left: displayAvatar.left
|
||||||
|
anchors.top: displayAvatar.top
|
||||||
|
anchors.leftMargin: Nheko.paddingMedium
|
||||||
|
anchors.topMargin: Nheko.paddingMedium
|
||||||
|
visible: roomSettings.canChangeAvatar
|
||||||
|
image: ":/icons/icons/ui/edit.svg"
|
||||||
|
onClicked: {
|
||||||
roomSettings.updateAvatar();
|
roomSettings.updateAvatar();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue