diff options
Diffstat (limited to 'desktop/modules/user/UserPage.qml')
| -rw-r--r-- | desktop/modules/user/UserPage.qml | 54 |
1 files changed, 37 insertions, 17 deletions
diff --git a/desktop/modules/user/UserPage.qml b/desktop/modules/user/UserPage.qml index feaf85f..fabb3e4 100644 --- a/desktop/modules/user/UserPage.qml +++ b/desktop/modules/user/UserPage.qml @@ -142,31 +142,51 @@ Column { onAccepted: form.set("avatar", decodeURIComponent(selectedFile.toString().replace(/^file:\/\//, ""))) } - ClippingRectangle { + // The picture glows on hover. The glow is what says "clickable": + // the hand cursor never shows here, since the cursor theme only ships + // hyprcursors and Qt finds no hand in it. + Item { anchors.horizontalCenter: parent.horizontalCenter - width: 160 - height: 160 - radius: 80 - color: Theme.surfaceAlt + width: 176 + height: 176 - Image { - id: pic - anchors.fill: parent - source: form.draft.avatar ? "file://" + form.draft.avatar.split("/").map(encodeURIComponent).join("/") : "" - fillMode: Image.PreserveAspectCrop - sourceSize: Qt.size(320, 320) - cache: false + Glow { + anchors.centerIn: parent + width: 160 + height: 160 + radius: 80 + on: avatarArea.containsMouse } - Text { + + ClippingRectangle { anchors.centerIn: parent - visible: pic.status !== Image.Ready - text: "\uf007" - font { family: Theme.iconFamily; pixelSize: 64 } - color: Theme.subtext + width: 160 + height: 160 + radius: 80 + color: Theme.surfaceAlt + + Image { + id: pic + anchors.fill: parent + source: form.draft.avatar ? "file://" + form.draft.avatar.split("/").map(encodeURIComponent).join("/") : "" + fillMode: Image.PreserveAspectCrop + sourceSize: Qt.size(320, 320) + cache: false + } + Text { + anchors.centerIn: parent + visible: pic.status !== Image.Ready + text: "\uf007" + font { family: Theme.iconFamily; pixelSize: 64 } + color: Theme.subtext + } } + MouseArea { + id: avatarArea anchors.fill: parent enabled: !form.busy + hoverEnabled: true cursorShape: Qt.PointingHandCursor onClicked: picker.open() } |
