From fae21cd73add8e0771652513e4982785b473d543 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 16 Jan 2026 02:09:38 +1100 Subject: dashboard: fix flickering on switch panes --- modules/dashboard/Content.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules') diff --git a/modules/dashboard/Content.qml b/modules/dashboard/Content.qml index 7259c4f..4eec97a 100644 --- a/modules/dashboard/Content.qml +++ b/modules/dashboard/Content.qml @@ -87,6 +87,7 @@ Item { id: row Pane { + index: 0 sourceComponent: Dash { visibilities: root.visibilities state: root.state @@ -95,16 +96,19 @@ Item { } Pane { + index: 1 sourceComponent: Media { visibilities: root.visibilities } } Pane { + index: 2 sourceComponent: Performance {} } Pane { + index: 3 sourceComponent: Weather {} } } @@ -130,9 +134,15 @@ Item { } component Pane: Loader { + id: pane + + required property int index + Layout.alignment: Qt.AlignTop Component.onCompleted: active = Qt.binding(() => { + // Always keep current tab loaded + if (pane.index === view.currentIndex) return true; const vx = Math.floor(view.visibleArea.xPosition * view.contentWidth); const vex = Math.floor(vx + view.visibleArea.widthRatio * view.contentWidth); return (vx >= x && vx <= x + implicitWidth) || (vex >= x && vex <= x + implicitWidth); -- cgit v1.2.3-freya