From cdd522d01d97ebc43b334d50605ace36c457dbaa Mon Sep 17 00:00:00 2001 From: ATMDA Date: Sun, 16 Nov 2025 19:48:32 -0500 Subject: controlcenter: deferred pane loading and limited simultaneous pane loading --- modules/controlcenter/Panes.qml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'modules/controlcenter') 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; -- cgit v1.2.3-freya