fix: smooth AppLauncher open/close animations and fix resolveIcon with AppLauncherService.iconMap

This commit is contained in:
Sho 2026-08-02 00:19:43 +09:00
parent 6e8dd482e0
commit 454023e8e0

View File

@ -30,15 +30,15 @@ PanelWindow {
id: openAnim id: openAnim
running: false running: false
to: 1.0 to: 1.0
duration: 90 duration: 140
easing.type: Easing.OutQuad easing.type: Easing.OutCubic
} }
NumberAnimation on openProgress { NumberAnimation on openProgress {
id: closeAnim id: closeAnim
running: false running: false
to: 0.0 to: 0.0
duration: 70 duration: 100
easing.type: Easing.InQuad easing.type: Easing.OutCubic
onFinished: PopupService.appLauncherOpen = false onFinished: PopupService.appLauncherOpen = false
} }
@ -83,7 +83,7 @@ PanelWindow {
Keys.onEscapePressed: root.closeWithAnimation() Keys.onEscapePressed: root.closeWithAnimation()
opacity: root.openProgress opacity: root.openProgress
scale: 0.97 + 0.03 * root.openProgress scale: 0.94 + 0.06 * root.openProgress
// Panel glass card // Panel glass card
Rectangle { Rectangle {
@ -444,6 +444,13 @@ PanelWindow {
return AppLauncherService.fallbackIconPath ? "file://" + AppLauncherService.fallbackIconPath : "" return AppLauncherService.fallbackIconPath ? "file://" + AppLauncherService.fallbackIconPath : ""
} }
if (iconName.startsWith("/")) return "file://" + iconName if (iconName.startsWith("/")) return "file://" + iconName
let lower = iconName.toLowerCase().trim()
if (AppLauncherService.iconMap && AppLauncherService.iconMap[lower]) {
let mapped = AppLauncherService.iconMap[lower]
return mapped.startsWith("/") ? "file://" + mapped : mapped
}
return AppLauncherService.fallbackIconPath ? "file://" + AppLauncherService.fallbackIconPath : "" return AppLauncherService.fallbackIconPath ? "file://" + AppLauncherService.fallbackIconPath : ""
} }
} }