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:
1 parent
604424869d
commit
972ab1120e
2 files changed
+9
-3
No files matched your search
@@ -36,7 +36,9 @@ Item {
|
||||
// Drop moves down on the way in and on the way out.
|
||||
property real dropFrom: -1
|
||||
onOpenChanged: dropFrom = open ? -1 : 1
|
||||
readonly property bool shown: progress > 0.001
|
||||
// The drop is already empty below 0.02; unmapping there means Hyprland's
|
||||
// fade-out has nothing left to fade.
|
||||
readonly property bool shown: progress > (liquid ? 0.02 : 0.001)
|
||||
// NotchDrop's content fade: in once the panel has its size, out first.
|
||||
readonly property real dropContent: {
|
||||
const t = Math.min(1, Math.max(0, (progress - 0.82) / 0.18));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user