From 3e0360401bbbb0f640958998f6625495e5b3fdff Mon Sep 17 00:00:00 2001 From: Robin Seger Date: Tue, 10 Mar 2026 15:22:23 +0100 Subject: 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> --- .../controlcenter/dashboard/PerformanceSection.qml | 45 ++++++++++++++++------ 1 file changed, 33 insertions(+), 12 deletions(-) (limited to 'modules/controlcenter/dashboard/PerformanceSection.qml') diff --git a/modules/controlcenter/dashboard/PerformanceSection.qml b/modules/controlcenter/dashboard/PerformanceSection.qml index 7e72782..ac84752 100644 --- a/modules/controlcenter/dashboard/PerformanceSection.qml +++ b/modules/controlcenter/dashboard/PerformanceSection.qml @@ -33,7 +33,7 @@ SectionContainer { opts.push({ "label": qsTr("Battery"), "propertyName": "showBattery", - "onToggled": function(checked) { + "onToggled": function (checked) { root.rootItem.showBattery = checked; root.rootItem.saveConfig(); } @@ -41,39 +41,39 @@ SectionContainer { if (root.gpuAvailable) opts.push({ - "label": qsTr("GPU"), - "propertyName": "showGpu", - "onToggled": function(checked) { - root.rootItem.showGpu = checked; - root.rootItem.saveConfig(); - } - }); + "label": qsTr("GPU"), + "propertyName": "showGpu", + "onToggled": function (checked) { + root.rootItem.showGpu = checked; + root.rootItem.saveConfig(); + } + }); opts.push({ "label": qsTr("CPU"), "propertyName": "showCpu", - "onToggled": function(checked) { + "onToggled": function (checked) { root.rootItem.showCpu = checked; root.rootItem.saveConfig(); } }, { "label": qsTr("Memory"), "propertyName": "showMemory", - "onToggled": function(checked) { + "onToggled": function (checked) { root.rootItem.showMemory = checked; root.rootItem.saveConfig(); } }, { "label": qsTr("Storage"), "propertyName": "showStorage", - "onToggled": function(checked) { + "onToggled": function (checked) { root.rootItem.showStorage = checked; root.rootItem.saveConfig(); } }, { "label": qsTr("Network"), "propertyName": "showNetwork", - "onToggled": function(checked) { + "onToggled": function (checked) { root.rootItem.showNetwork = checked; root.rootItem.saveConfig(); } @@ -82,4 +82,25 @@ SectionContainer { } } + SliderInput { + Layout.fillWidth: true + + label: qsTr("Resource update interval") + value: root.rootItem.resourceUpdateInterval + 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.resourceUpdateInterval = Math.round(newValue); + root.rootItem.saveConfig(); + } + } } -- cgit v1.2.3-freya