summaryrefslogtreecommitdiff
path: root/modules/dashboard
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-03 17:53:06 +1100
committerGitHub <noreply@github.com>2026-01-03 17:53:06 +1100
commitbdcd13222fc6edc77c779a396900ab909e7d5439 (patch)
treef9457f3c91c05ec852f974f239d06aca52a3918e /modules/dashboard
parent[CI] chore: update flake (diff)
parentMerge branch 'caelestia-dots:main' into main (diff)
downloadcaelestia-shell-bdcd13222fc6edc77c779a396900ab909e7d5439.tar.gz
caelestia-shell-bdcd13222fc6edc77c779a396900ab909e7d5439.tar.bz2
caelestia-shell-bdcd13222fc6edc77c779a396900ab909e7d5439.zip
Merge pull request #906 from atdma/main
controlcenter: many setting panes and minor features
Diffstat (limited to 'modules/dashboard')
-rw-r--r--modules/dashboard/Content.qml11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/dashboard/Content.qml b/modules/dashboard/Content.qml
index 8a9ed5f..707bee3 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,12 +96,14 @@ Item {
}
Pane {
+ index: 1
sourceComponent: Media {
visibilities: root.visibilities
}
}
Pane {
+ index: 2
sourceComponent: Performance {}
}
}
@@ -126,12 +129,14 @@ Item {
}
component Pane: Loader {
+ required property int index
+
Layout.alignment: Qt.AlignTop
Component.onCompleted: active = Qt.binding(() => {
- 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);
+ const current = view.currentIndex;
+ // Activate current pane and adjacent panes for smooth scrolling
+ return Math.abs(index - current) <= 1;
})
}
}