Files
z-bar-qt/Modules/Dashboard/Dash/Resources.qml
T
zach 7d6f3cc275
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 20s
JS/TS / lint (pull_request) Successful in 22s
Python / static (pull_request) Successful in 57s
Rust / fmt (pull_request) Successful in 1m2s
C++ / build (pull_request) Successful in 2m10s
Rust / build (pull_request) Successful in 1m50s
Rust / clippy (pull_request) Successful in 1m25s
Python / verify (pull_request) Successful in 2m58s
C++ / clang-tidy (pull_request) Successful in 7m8s
initial commit for media widget update + anim tokens restructure
2026-08-18 16:14:41 +02:00

91 lines
1.4 KiB
QML

import QtQuick
import QtQuick.Layouts
import ZShell.Services
import ZShell.Config
import qs.Components
import qs.Services
Item {
id: root
anchors.bottom: parent.bottom
anchors.top: parent.top
implicitWidth: layout.implicitWidth + layout.anchors.margins * 4
ServiceRef {
service: Storage
}
ServiceRef {
service: Memory
}
ServiceRef {
service: Cpu
}
ServiceRef {
service: Gpu
}
ColumnLayout {
id: layout
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.margins: Tokens.padding.large
anchors.top: parent.top
spacing: Tokens.spacing.medium
Resource {
fgColor: Colors.palette.m3primary
icon: "memory"
value: Cpu.percentage
}
Resource {
fgColor: Colors.palette.m3secondary
icon: "memory_alt"
value: Memory.percentage
}
Resource {
fgColor: Colors.palette.m3tertiary
icon: "gamepad"
value: Gpu.percentage
}
Resource {
fgColor: Colors.palette.m3primary
icon: "host"
value: Gpu.memoryUsed / Gpu.memoryTotal
}
Resource {
fgColor: Colors.palette.m3secondary
icon: "hard_disk"
value: Storage.percentage
}
}
component Resource: CircularProgress {
id: res
required property string icon
Layout.fillHeight: true
implicitSize: height
Behavior on clampedVal {
Anim {
}
}
MaterialIcon {
anchors.centerIn: parent
color: res.fgColor
text: res.icon
}
}
}