Redesign Quickshell control center
This commit is contained in:
91
fedora/quickshell/control-center/StatusPage.qml
Normal file
91
fedora/quickshell/control-center/StatusPage.qml
Normal file
@@ -0,0 +1,91 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property var settings
|
||||
property var theme
|
||||
property string cpuTemperature: "--"
|
||||
property string gpuTemperature: "--"
|
||||
property string temperatureColorCpu: "#9399b2"
|
||||
property string temperatureColorGpu: "#9399b2"
|
||||
implicitHeight: pageColumn.implicitHeight
|
||||
|
||||
ColumnLayout {
|
||||
id: pageColumn
|
||||
width: parent.width
|
||||
spacing: 10
|
||||
|
||||
SettingsCard {
|
||||
theme: root.theme
|
||||
title: "Temperatures"
|
||||
description: "The existing CPU and GPU readers remain active in the bar service."
|
||||
Layout.fillWidth: true
|
||||
SettingsRow { theme: root.theme; label: "CPU temperature"; Label { text: root.cpuTemperature; color: root.temperatureColorCpu } }
|
||||
SettingsRow { theme: root.theme; label: "GPU temperature"; Label { text: root.gpuTemperature; color: root.temperatureColorGpu } }
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
theme: root.theme
|
||||
title: "Polling"
|
||||
description: "Used by the system metrics and temperature readers."
|
||||
Layout.fillWidth: true
|
||||
SettingsRow {
|
||||
theme: root.theme
|
||||
label: "Refresh interval"
|
||||
ComboBox {
|
||||
palette.base: root.theme.surfaceVariant
|
||||
palette.button: root.theme.surfaceVariant
|
||||
palette.text: root.theme.text
|
||||
palette.buttonText: root.theme.text
|
||||
palette.highlight: root.theme.primary
|
||||
model: ["1 second", "2 seconds", "5 seconds"]
|
||||
currentIndex: [1000, 2000, 5000].indexOf(root.settings.temperatureInterval)
|
||||
onActivated: root.settings.temperatureInterval = [1000, 2000, 5000][currentIndex]
|
||||
}
|
||||
}
|
||||
SettingsRow {
|
||||
theme: root.theme
|
||||
label: "Warning / critical"
|
||||
SpinBox {
|
||||
palette.base: root.theme.surfaceVariant
|
||||
palette.text: root.theme.text
|
||||
palette.button: root.theme.surfaceVariant
|
||||
palette.buttonText: root.theme.text
|
||||
from: 40
|
||||
to: 99
|
||||
value: root.settings.temperatureWarning
|
||||
editable: true
|
||||
onValueModified: root.settings.setTemperatureWarning(value)
|
||||
}
|
||||
Label { text: "/"; color: root.theme.mutedText }
|
||||
SpinBox {
|
||||
palette.base: root.theme.surfaceVariant
|
||||
palette.text: root.theme.text
|
||||
palette.button: root.theme.surfaceVariant
|
||||
palette.buttonText: root.theme.text
|
||||
from: 41
|
||||
to: 110
|
||||
value: root.settings.temperatureCritical
|
||||
editable: true
|
||||
onValueModified: root.settings.setTemperatureCritical(value)
|
||||
}
|
||||
Label { text: "°C"; color: root.theme.mutedText }
|
||||
}
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
theme: root.theme
|
||||
title: "Live status"
|
||||
description: "Weather, keyboard layouts, workspaces and tray filtering keep their current polling paths."
|
||||
Layout.fillWidth: true
|
||||
Label {
|
||||
text: "Screen-sharing tray items remain hidden."
|
||||
color: root.theme.success
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user