Let the notch drop vanish fully before its panel unmaps

At high closing speeds the last frame still held a small bead, which
Hyprland's layer fade-out then faded away. The bead now shrinks into
the island and the drawer unmaps once it is empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-26 14:27:32 +01:00
1 parent 604424869d
commit 972ab1120e
2 files changed
+9 -3

No files matched your search

+6 -2
View File
@@ -55,7 +55,10 @@ Item {
const b = clamp((p - 0.3) / 0.62, 0, 1); // bead becomes the panel
const eb = out3(b);
const release = sstep(0.8, 0.95, p); // the neck lets go
const bulbR = lerp(3, bulbMax, a);
// The bead shrinks all the way back into the island, so the last frame
// before the layer unmaps is empty (Hyprland fades that frame out).
const grow = sstep(0.015, 0.12, p);
const bulbR = Math.max(0.01, lerp(0, bulbMax, a) * grow);
const hang = Math.max(4, Math.min(66, H - bulbMax - 2 - top));
const beadY = top + lerp(4, hang, a);
// A small sideways swell as it settles, kept inside the ears.
@@ -64,7 +67,7 @@ Item {
const halfH = lerp(bulbR, H / 2, eb);
const cx = lerp(sx, X + W / 2, eb), cy = lerp(beadY, H / 2, eb);
return {
stem: Qt.vector4d(sx, top, lerp(6, 11, a) * (1 - release), lerp(bulbR * 0.9, 10, eb) * (1 - release)),
stem: Qt.vector4d(sx, top, lerp(6, 11, a) * grow * (1 - release), lerp(bulbR * 0.9, 10, eb) * (1 - release)),
stemH: lerp(beadY, 12, eb) - top,
box: Qt.vector4d(cx, cy, halfW, halfH),
boxR: Math.min(lerp(bulbR, panelR, eb), halfW, halfH),
@@ -101,6 +104,7 @@ Item {
ShaderEffect {
anchors.fill: parent
opacity: root.sstep(0.005, 0.04, root.progress)
property point size: Qt.point(width, height)
property real topY: -root.topSpace
property vector4d stem: root.g.stem