summaryrefslogtreecommitdiff
path: root/modules/dashboard
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-16 02:09:38 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-16 02:09:38 +1100
commitfae21cd73add8e0771652513e4982785b473d543 (patch)
treebde8965a983e5f6e9d71a1bdb7872a4f4fdedc32 /modules/dashboard
parentinternal: fix errors due to sync loaders (diff)
downloadcaelestia-shell-fae21cd73add8e0771652513e4982785b473d543.tar.gz
caelestia-shell-fae21cd73add8e0771652513e4982785b473d543.tar.bz2
caelestia-shell-fae21cd73add8e0771652513e4982785b473d543.zip
dashboard: fix flickering on switch panes
Diffstat (limited to 'modules/dashboard')
-rw-r--r--modules/dashboard/Content.qml10
1 files changed, 10 insertions, 0 deletions
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);