aboutsummaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-16 10:19:46 +0200
committerDanilo M. <danix@danix.xyz>2026-10-16 10:19:46 +0200
commit1e0cb0bc16d5971e6e42c105622443d955ccdf5e (patch)
treeb28783d823f1511d78d5dd30ae8d54e9fe4a572f /shared
parent22db61bebaba4fdc58110f8bcc07313d330ac658 (diff)
downloadquickshell-1e0cb0bc16d5971e6e42c105622443d955ccdf5e.tar.gz
quickshell-1e0cb0bc16d5971e6e42c105622443d955ccdf5e.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'shared')
-rw-r--r--shared/Glow.qml28
1 files changed, 28 insertions, 0 deletions
diff --git a/shared/Glow.qml b/shared/Glow.qml
new file mode 100644
index 0000000..58aa45d
--- /dev/null
+++ b/shared/Glow.qml
@@ -0,0 +1,28 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+import QtQuick
+import QtQuick.Effects
+
+// The shells' one glow: an accent haze fading out from a shape's edge, in
+// place of solid rings and thick hover borders. It goes under the item it
+// lights, same size and radius: a child with `z: -1` and `anchors.fill:
+// parent`, or a sibling declared before it. `on` fades it in. Linked into
+// each shell that uses it, like Theme.qml.
+RectangularShadow {
+ property bool on: false
+
+ color: Theme.accent
+ blur: 20
+ spread: 2
+ opacity: on ? 0.9 : 0
+ Behavior on opacity { NumberAnimation { duration: 140 } }
+}