diff options
| author | Robin Seger <pixelkhaos@gmail.com> | 2026-03-10 15:22:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-11 01:22:23 +1100 |
| commit | 3e0360401bbbb0f640958998f6625495e5b3fdff (patch) | |
| tree | 8c240477df130a95211b64649b40e7ba25972454 /modules/controlcenter/dashboard/GeneralSection.qml | |
| parent | systemusage: improve GPU detection for AMD RX series GPU (#1246) (diff) | |
| download | caelestia-shell-3e0360401bbbb0f640958998f6625495e5b3fdff.tar.gz caelestia-shell-3e0360401bbbb0f640958998f6625495e5b3fdff.tar.bz2 caelestia-shell-3e0360401bbbb0f640958998f6625495e5b3fdff.zip | |
dashboard: dynamic dashboard tabs + fix performance settings updating (#1253)
* [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
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'modules/controlcenter/dashboard/GeneralSection.qml')
| -rw-r--r-- | modules/controlcenter/dashboard/GeneralSection.qml | 105 |
1 files changed, 76 insertions, 29 deletions
diff --git a/modules/controlcenter/dashboard/GeneralSection.qml b/modules/controlcenter/dashboard/GeneralSection.qml index bf54e97..95e7531 100644 --- a/modules/controlcenter/dashboard/GeneralSection.qml +++ b/modules/controlcenter/dashboard/GeneralSection.qml @@ -38,44 +38,91 @@ SectionContainer { } } - SectionContainer { - contentSpacing: Appearance.spacing.normal + RowLayout { + Layout.fillWidth: true + spacing: Appearance.spacing.normal - SliderInput { + SwitchRow { Layout.fillWidth: true - - label: qsTr("Update interval") - value: root.rootItem.updateInterval - from: 100 - to: 10000 - stepSize: 100 - suffix: "ms" - validator: IntValidator { bottom: 100; top: 10000 } - formatValueFunction: (val) => Math.round(val).toString() - parseValueFunction: (text) => parseInt(text) - - onValueModified: (newValue) => { - root.rootItem.updateInterval = Math.round(newValue); + label: qsTr("Show Dashboard tab") + checked: root.rootItem.showDashboard + onToggled: checked => { + root.rootItem.showDashboard = checked; root.rootItem.saveConfig(); } } - SliderInput { + SwitchRow { Layout.fillWidth: true - - label: qsTr("Drag threshold") - value: root.rootItem.dragThreshold - from: 0 - to: 100 - suffix: "px" - validator: IntValidator { bottom: 0; top: 100 } - formatValueFunction: (val) => Math.round(val).toString() - parseValueFunction: (text) => parseInt(text) - - onValueModified: (newValue) => { - root.rootItem.dragThreshold = Math.round(newValue); + label: qsTr("Show Media tab") + checked: root.rootItem.showMedia + onToggled: checked => { + root.rootItem.showMedia = checked; root.rootItem.saveConfig(); } } + + SwitchRow { + Layout.fillWidth: true + label: qsTr("Show Performance tab") + checked: root.rootItem.showPerformance + onToggled: checked => { + root.rootItem.showPerformance = checked; + root.rootItem.saveConfig(); + } + } + + SwitchRow { + Layout.fillWidth: true + label: qsTr("Show Weather tab") + checked: root.rootItem.showWeather + onToggled: checked => { + root.rootItem.showWeather = checked; + root.rootItem.saveConfig(); + } + } + } + + SliderInput { + Layout.fillWidth: true + + label: qsTr("Media update interval") + value: root.rootItem.mediaUpdateInterval + from: 100 + to: 10000 + stepSize: 100 + suffix: "ms" + validator: IntValidator { + bottom: 100 + top: 10000 + } + formatValueFunction: val => Math.round(val).toString() + parseValueFunction: text => parseInt(text) + + onValueModified: newValue => { + root.rootItem.mediaUpdateInterval = Math.round(newValue); + root.rootItem.saveConfig(); + } + } + + SliderInput { + Layout.fillWidth: true + + label: qsTr("Drag threshold") + value: root.rootItem.dragThreshold + from: 0 + to: 100 + suffix: "px" + validator: IntValidator { + bottom: 0 + top: 100 + } + formatValueFunction: val => Math.round(val).toString() + parseValueFunction: text => parseInt(text) + + onValueModified: newValue => { + root.rootItem.dragThreshold = Math.round(newValue); + root.rootItem.saveConfig(); + } } } |