summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-13 10:57:29 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-13 10:57:29 +1000
commitb5883441df13257fd34005e97c62b1862113a048 (patch)
tree0daa99443585ed668f0ef5179dd47aaecf618452
parentplugin/service: fix invoke after destruction (diff)
downloadcaelestia-shell-b5883441df13257fd34005e97c62b1862113a048.tar.gz
caelestia-shell-b5883441df13257fd34005e97c62b1862113a048.tar.bz2
caelestia-shell-b5883441df13257fd34005e97c62b1862113a048.zip
launcher: fix anim
Fixes #607
-rw-r--r--modules/launcher/Wrapper.qml45
1 files changed, 41 insertions, 4 deletions
diff --git a/modules/launcher/Wrapper.qml b/modules/launcher/Wrapper.qml
index 299828f..51354c2 100644
--- a/modules/launcher/Wrapper.qml
+++ b/modules/launcher/Wrapper.qml
@@ -20,6 +20,7 @@ Item {
onShouldBeActiveChanged: {
if (shouldBeActive) {
+ timer.stop();
hideAnim.stop();
showAnim.start();
} else {
@@ -57,16 +58,52 @@ Item {
}
}
+ Connections {
+ target: Config.launcher
+
+ function onEnabledChanged(): void {
+ timer.start();
+ }
+
+ function onMaxShownChanged(): void {
+ timer.start();
+ }
+ }
+
+ Connections {
+ target: DesktopEntries.applications
+
+ function onValuesChanged(): void {
+ if (DesktopEntries.applications.values.length < Config.launcher.maxShown)
+ timer.start();
+ }
+ }
+
+ Timer {
+ id: timer
+
+ interval: Appearance.anim.durations.extraLarge
+ onRunningChanged: {
+ if (running) {
+ content.visible = false;
+ content.active = true;
+ } else {
+ root.contentHeight = content.implicitHeight;
+ content.active = Qt.binding(() => root.shouldBeActive || root.visible);
+ content.visible = true;
+ }
+ }
+ }
+
Loader {
id: content
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
- Component.onCompleted: {
- root.contentHeight = implicitHeight;
- active = Qt.binding(() => root.shouldBeActive || root.visible);
- }
+ visible: false
+ active: false
+ Component.onCompleted: timer.start()
sourceComponent: Content {
visibilities: root.visibilities