diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-09-02 18:26:45 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-09-02 18:26:45 +0800 |
| commit | f7a43077fe4e139dd7e3f46f448e0951740ec148 (patch) | |
| tree | f6a68248fe42bd899e99049bab7fdb7e5d26ea60 /bar/Resources.qml | |
| parent | 2f7576faf493b4667b02dcb60ddbf3aa0a9f654b (diff) | |
fix: qmlfmt
IListView: animation
Diffstat (limited to 'bar/Resources.qml')
| -rw-r--r-- | bar/Resources.qml | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/bar/Resources.qml b/bar/Resources.qml index a4d2a2f..943bd52 100644 --- a/bar/Resources.qml +++ b/bar/Resources.qml @@ -7,53 +7,53 @@ import qs.config as Config import qs.services as Services Item { - implicitWidth: container.implicitWidth - implicitHeight: container.implicitHeight + implicitWidth: container.implicitWidth + implicitHeight: container.implicitHeight - IRect { - id: container - implicitWidth: layout.implicitWidth + Config.General.rectMargin * 2 - implicitHeight: Config.Bar.height - Config.General.rectMargin + IRect { + id: container + implicitWidth: layout.implicitWidth + Config.General.rectMargin * 2 + implicitHeight: Config.Bar.height - Config.General.rectMargin - color: Config.Colors.accent - radius: Config.Style.rounding.large + color: Config.Colors.accent + radius: Config.Style.rounding.large - Row { - id: layout - anchors.centerIn: parent - SimpleResource { - value: Math.round(Services.Resource.cpuUsage * 100) - altValue: Math.round(Services.Resource.cpuFreq / 10) / 100 - suffix: "%" - altSuffix: "GHz" - icon: Config.Icons.resource.cpu - } - SimpleResource { - icon: Config.Icons.resource.memory - value: Math.round(Services.Resource.memoryUsedPercentage * 100) - altValue: Math.round(Services.Resource.memoryUsed / 1024 / 1024) - suffix: "%" - altSuffix: "GB" - } - SimpleResource { - icon: Config.Icons.resource.gpu - value: Services.Resource.gpuUsage - altValue: Services.Resource.gpuTemp - suffix: "%" - altSuffix: "°C" - altIcon: Config.Icons.resource.temp - thresholdL1: 60 - thresholdL2: 70 - thresholdL3: 80 - } - SimpleResource { - icon: Config.Icons.resource.temp - value: Math.round(Services.Resource.cpuTemp * 100) - suffix: "°C" - thresholdL1: 60 - thresholdL2: 80 - thresholdL3: 90 - } - } - } + Row { + id: layout + anchors.centerIn: parent + SimpleResource { + value: Math.round(Services.Resource.cpuUsage * 100) + altValue: Math.round(Services.Resource.cpuFreq / 10) / 100 + suffix: "%" + altSuffix: "GHz" + icon: Config.Icons.resource.cpu + } + SimpleResource { + icon: Config.Icons.resource.memory + value: Math.round(Services.Resource.memoryUsedPercentage * 100) + altValue: Math.round(Services.Resource.memoryUsed / 1024 / 1024) + suffix: "%" + altSuffix: "GB" + } + SimpleResource { + icon: Config.Icons.resource.gpu + value: Services.Resource.gpuUsage + altValue: Services.Resource.gpuTemp + suffix: "%" + altSuffix: "°C" + altIcon: Config.Icons.resource.temp + thresholdL1: 60 + thresholdL2: 70 + thresholdL3: 80 + } + SimpleResource { + icon: Config.Icons.resource.temp + value: Math.round(Services.Resource.cpuTemp * 100) + suffix: "°C" + thresholdL1: 60 + thresholdL2: 80 + thresholdL3: 90 + } + } + } } |
