From f38b1c8b2a01ddc7ce791d34e713609dc25ad9c3 Mon Sep 17 00:00:00 2001 From: Jim Muttonen Date: Sun, 15 Nov 2026 19:50:10 +0100 Subject: [PATCH] Pre-map the launcher surface and fade the first open in with ease-out On the first open Hyprland mapped a fresh surface and ran its own slow, near-linear fade, so the launcher showed nothing for ~130 ms and then faded in over ~150 ms. Map the transparent, inputless surface when the plugin loads, and reveal the content with a 90 ms OutCubic fade. Closing stays instant. --- ui/LauncherWindow.qml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ui/LauncherWindow.qml b/ui/LauncherWindow.qml index 3e225a2..cc42cfb 100644 --- a/ui/LauncherWindow.qml +++ b/ui/LauncherWindow.qml @@ -231,7 +231,29 @@ PanelWindow { Binding { target: window.contentItem property: "opacity" - value: window.contentRevealed ? 1 : 0 + value: window.revealProgress + } + // Fade in with ease-out (fast start, soft landing) so the first open doesn't + // read as a delayed ease-in. Hiding stays instant. + onContentRevealedChanged: { + if (window.contentRevealed) revealAnim.restart() + else { revealAnim.stop(); window.revealProgress = 0 } + } + property real revealProgress: 0 + NumberAnimation { + id: revealAnim + target: window + property: "revealProgress" + to: 1 + duration: 90 + easing.type: Easing.OutCubic + } + + // Map the (transparent, inputless) surface at load, so the first open is a + // single commit instead of paying the ~130 ms mapping cost on the keypress. + Component.onCompleted: { + if (!window.pinnedScreen) window.pinnedScreen = window.focusedScreen() + window.mapped = true } // A reload or disable while shown would otherwise leave Hyprland in the submap.