From 1e0cb0bc16d5971e6e42c105622443d955ccdf5e Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 10:19:46 +0200 Subject: feat(shared): one faded glow for hovers across the shells Hover and attention effects were solid: a flat accent ring round the user page's avatar, a flat quarter-disc in the hot corner, and thick accent or white borders on window cards, keycaps and knobs. Glow.qml is a RectangularShadow in the accent, fading out from the shape's edge and in over 140ms, linked into desktop, window-switcher and keybinds like Theme.qml, and all five places use it. Selection borders in the appearance tabs stay: they mark state, not hover. The avatar also gains the hover cue in the first place: the hand cursor never showed under a hyprcursor-only theme, so without it the picture gave no sign it could be clicked. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/user/UserPage.qml | 54 +++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 17 deletions(-) (limited to 'desktop/modules/user/UserPage.qml') 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() } -- cgit v1.2.3