diff options
| author | ATMDA <atdma2600@gmail.com> | 2025-11-16 19:48:32 -0500 |
|---|---|---|
| committer | ATMDA <atdma2600@gmail.com> | 2025-11-16 19:48:32 -0500 |
| commit | cdd522d01d97ebc43b334d50605ace36c457dbaa (patch) | |
| tree | 9daae9e36dcc4210caf3f629cb57d5dd50de49e8 /modules/controlcenter | |
| parent | controlcenter: added collapse/expand all to apperaance and taskbar (diff) | |
| download | caelestia-shell-cdd522d01d97ebc43b334d50605ace36c457dbaa.tar.gz caelestia-shell-cdd522d01d97ebc43b334d50605ace36c457dbaa.tar.bz2 caelestia-shell-cdd522d01d97ebc43b334d50605ace36c457dbaa.zip | |
controlcenter: deferred pane loading and limited simultaneous pane loading
Diffstat (limited to '')
| -rw-r--r-- | modules/controlcenter/Panes.qml | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/modules/controlcenter/Panes.qml b/modules/controlcenter/Panes.qml index 28124a0..e97a3fe 100644 --- a/modules/controlcenter/Panes.qml +++ b/modules/controlcenter/Panes.qml @@ -50,6 +50,9 @@ ClippingRectangle { clip: true property bool animationComplete: true + // Track if initial opening animation has completed + // During initial opening, only the active pane loads to avoid hiccups + property bool initialOpeningComplete: false Timer { id: animationDelayTimer @@ -59,6 +62,17 @@ ClippingRectangle { } } + // Timer to detect when initial opening animation completes + // Uses large duration to cover both normal and detached opening cases + Timer { + id: initialOpeningTimer + interval: Appearance.anim.durations.large + running: true + onTriggered: { + layout.initialOpeningComplete = true; + } + } + Pane { index: 0 sourceComponent: NetworkingPane { @@ -135,8 +149,20 @@ ClippingRectangle { asynchronous: true active: { const diff = Math.abs(root.session.activeIndex - pane.index); + const isActivePane = diff === 0; + + // During initial opening animation, only load the active pane + // This prevents hiccups from multiple panes loading simultaneously + if (!layout.initialOpeningComplete) { + if (isActivePane) { + pane.hasBeenLoaded = true; + return true; + } + // Defer all other panes until initial opening completes + return false; + } - // Always activate current and adjacent panes immediately for smooth transitions + // After initial opening, allow current and adjacent panes for smooth transitions if (diff <= 1) { pane.hasBeenLoaded = true; return true; |