summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRobin Seger <pixelkhaos@gmail.com>2026-03-15 07:19:44 +0100
committerGitHub <noreply@github.com>2026-03-15 17:19:44 +1100
commit12b07b7cdfa9de0e7f78b7168fc2cee358002167 (patch)
treecdc94cd7024378f2f8dc06957ad5f79ee07aca11 /modules
parentfix: performance network usage jumping around (diff)
downloadcaelestia-shell-12b07b7cdfa9de0e7f78b7168fc2cee358002167.tar.gz
caelestia-shell-12b07b7cdfa9de0e7f78b7168fc2cee358002167.tar.bz2
caelestia-shell-12b07b7cdfa9de0e7f78b7168fc2cee358002167.zip
dash: use currentIndex for width, restore binding (#1286)
* [CI] chore: update flake * Dashboard perf settings save, visibility on none enabled * Dashboard heigh stutter fixed, persist current tab * restore binding * wrapper async=false * ScriptModel, centralized tabs/panes, individual toggle * fixes, missed mediaUpdateInterval, passing values * add binding back, ensure active tab uses bar.currentIndex --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/dashboard/Tabs.qml13
-rw-r--r--modules/dashboard/Wrapper.qml1
2 files changed, 10 insertions, 4 deletions
diff --git a/modules/dashboard/Tabs.qml b/modules/dashboard/Tabs.qml
index ed4613d..6e09e76 100644
--- a/modules/dashboard/Tabs.qml
+++ b/modules/dashboard/Tabs.qml
@@ -52,15 +52,20 @@ Item {
anchors.top: bar.bottom
anchors.topMargin: 5
- implicitWidth: bar.currentItem?.implicitWidth ?? 0
+ implicitWidth: {
+ const tab = bar.currentItem;
+ if (tab)
+ return tab.implicitWidth;
+ const width = (root.nonAnimWidth - bar.spacing * (bar.count - 1)) / bar.count;
+ return width;
+ }
implicitHeight: 3
x: {
const tab = bar.currentItem;
- if (!tab)
- return 0;
const width = (root.nonAnimWidth - bar.spacing * (bar.count - 1)) / bar.count;
- return width * tab.TabBar.index + (width - tab.implicitWidth) / 2;
+ const tabWidth = tab?.implicitWidth ?? width;
+ return width * bar.currentIndex + (width - tabWidth) / 2;
}
clip: true
diff --git a/modules/dashboard/Wrapper.qml b/modules/dashboard/Wrapper.qml
index 81bfcd3..0e37909 100644
--- a/modules/dashboard/Wrapper.qml
+++ b/modules/dashboard/Wrapper.qml
@@ -82,6 +82,7 @@ Item {
running: true
interval: Appearance.anim.durations.extraLarge
onTriggered: {
+ content.active = Qt.binding(() => (root.visibilities.dashboard && Config.dashboard.enabled) || root.visible);
content.visible = true;
}
}