From 94bf65ab4379cd6c6941c9947aa1331766fdec0c Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 26 Jul 2023 02:55:24 -0400 Subject: [PATCH] Add an obvious "upload" button in the account editor It's not obvious at first glance that you can click on the avatar in the account editor to upload an image. This adds a new button when there is no image uploaded. (cherry picked from commit 0ac39323035b70d94539deae994604a91dddf562) --- src/qml/Settings/AccountEditorPage.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/qml/Settings/AccountEditorPage.qml b/src/qml/Settings/AccountEditorPage.qml index 0d4962528..0f2d7ebf5 100644 --- a/src/qml/Settings/AccountEditorPage.qml +++ b/src/qml/Settings/AccountEditorPage.qml @@ -63,6 +63,23 @@ Kirigami.ScrollablePage { fileDialog.open(); } + QQC2.Button { + anchors { + bottom: parent.bottom + right: parent.right + } + visible: avatar.source.toString().length === 0 + icon.name: "cloud-upload" + text: i18n("Upload new avatar") + display: QQC2.AbstractButton.IconOnly + + onClicked: parent.onClicked() + + QQC2.ToolTip.text: text + QQC2.ToolTip.visible: hovered + QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay + } + QQC2.Button { anchors { bottom: parent.bottom