style: enhance AppLauncher open animation with Easing.OutBack spring pop-out effect

This commit is contained in:
Sho 2026-08-02 00:20:28 +09:00
parent 3413c6517e
commit c4f9e90996

View File

@ -30,22 +30,26 @@ PanelWindow {
id: openAnim id: openAnim
running: false running: false
to: 1.0 to: 1.0
duration: 140 duration: 220
easing.type: Easing.OutCubic easing.type: Easing.OutBack
easing.overshoot: 1.2
} }
NumberAnimation on openProgress { NumberAnimation on openProgress {
id: closeAnim id: closeAnim
running: false running: false
to: 0.0 to: 0.0
duration: 100 duration: 160
easing.type: Easing.OutCubic easing.type: Easing.InBack
easing.overshoot: 1.2
onFinished: PopupService.appLauncherOpen = false onFinished: PopupService.appLauncherOpen = false
} }
onVisibleChanged: { onVisibleChanged: {
if (visible) { if (visible) {
closeAnim.running = false
openProgress = 0.0 openProgress = 0.0
openAnim.running = true openAnim.restart()
AppLauncherService.reset() AppLauncherService.reset()
searchField.text = "" searchField.text = ""
root.selectedIndex = 0 root.selectedIndex = 0
@ -58,7 +62,7 @@ PanelWindow {
function closeWithAnimation() { function closeWithAnimation() {
openAnim.running = false openAnim.running = false
closeAnim.running = true closeAnim.restart()
} }
// Dim background // Dim background
@ -82,8 +86,8 @@ PanelWindow {
focus: root.visible focus: root.visible
Keys.onEscapePressed: root.closeWithAnimation() Keys.onEscapePressed: root.closeWithAnimation()
opacity: root.openProgress opacity: Math.max(0.0, Math.min(1.0, root.openProgress))
scale: 0.94 + 0.06 * root.openProgress scale: 0.85 + 0.15 * root.openProgress
// Panel glass card // Panel glass card
Rectangle { Rectangle {