diff --git a/desktopenvs/hyprlua/astal-menu/style/style.css b/desktopenvs/hyprlua/astal-menu/style/style.css index 119f712..c925b18 100644 --- a/desktopenvs/hyprlua/astal-menu/style/style.css +++ b/desktopenvs/hyprlua/astal-menu/style/style.css @@ -42,6 +42,15 @@ drawingarea { opacity: 0.15; } +/* bouncy pop when a quad expands (added in ui/quadgrid.py on expand) */ +@keyframes quad-pop { + 0% { transform: scale(0.82); opacity: 0.4; } + 55% { transform: scale(1.05); opacity: 1; } + 78% { transform: scale(0.985); } + 100% { transform: scale(1.0); } +} +.quad-pop { animation: quad-pop 300ms ease-out; } + .quad-card { min-height: 100px; } .section-title { color: @text; font-weight: bold; opacity: 0.85; } diff --git a/desktopenvs/hyprlua/astal-menu/ui/quadgrid.py b/desktopenvs/hyprlua/astal-menu/ui/quadgrid.py index 80796df..a33aad3 100644 --- a/desktopenvs/hyprlua/astal-menu/ui/quadgrid.py +++ b/desktopenvs/hyprlua/astal-menu/ui/quadgrid.py @@ -52,7 +52,8 @@ class QuadGrid(Gtk.Overlay): self._expand_reveal.set_valign(Gtk.Align.FILL) self._expand_holder = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self._expand_holder.add_css_class("quad-expanded") - self._expand_reveal.set_child(bordered(self._expand_holder, radius=16, fill_bg=True)) + self._expand_card = bordered(self._expand_holder, radius=16, fill_bg=True) + self._expand_reveal.set_child(self._expand_card) self.add_overlay(self._expand_reveal) # The overlay's holder is opaque; keep the whole overlay hidden unless a quad # is actually expanded, otherwise it paints over the 2x2 grid. @@ -82,12 +83,16 @@ class QuadGrid(Gtk.Overlay): self._expand_holder.append(content) self._expanded_id = module_id self._expand_reveal.set_reveal_child(True) + # bouncy scale pop (CSS @keyframes); the class was cleared on collapse so + # re-adding it here replays the animation on every expand. + self._expand_card.add_css_class("quad-pop") self.grid.add_css_class("dimmed") card.on_show() def request_collapse(self) -> None: self._expand_reveal.set_reveal_child(False) self._expand_reveal.set_visible(False) + self._expand_card.remove_css_class("quad-pop") # reset so the pop replays self._expanded_id = None self.grid.remove_css_class("dimmed") # Drop the reference to the reparented widget so the card can reuse it. diff --git a/desktopenvs/hyprlua/hypr/hyprland.lua b/desktopenvs/hyprlua/hypr/hyprland.lua index 76de5bb..3a68b9b 100644 --- a/desktopenvs/hyprlua/hypr/hyprland.lua +++ b/desktopenvs/hyprlua/hypr/hyprland.lua @@ -207,6 +207,13 @@ hl.animation({ leaf = "fade", enabled = true, speed = 7, bezier = " -- from regular workspace transitions which use horizontal slides by default. hl.animation({ leaf = "specialWorkspace", enabled = true, speed = 10, bezier = "default", style = "slidevert" }) +-- Layer-shell surfaces (the astal-menu control centre, notifications, the bar) slide +-- in from their anchored edge with the bouncy myBezier curve, so opening the menu +-- reads as a springy slide-down rather than a plain fade. (A per-namespace layerrule +-- was tried but this hyprlua build doesn't honour its animation timing; the global +-- `layers` leaf does.) +hl.animation({ leaf = "layers", enabled = true, speed = 5, bezier = "myBezier", style = "slide" }) + -------------- ---- DEVICE --- --------------