Files
z-bar-qt/Modules/Dashboard/Dash/Resources.qml
T
zach 11e7aac195
C++ / fmt (pull_request) Failing after 5s
C++ / build (pull_request) Failing after 11s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 12s
JS/TS / lint (pull_request) Successful in 10s
Python / static (pull_request) Failing after 27s
Rust / build (pull_request) Successful in 54s
Python / verify (pull_request) Failing after 1m26s
Rust / fmt (pull_request) Successful in 46s
Rust / clippy (pull_request) Successful in 1m6s
feat: better notification storage and image caching + blobs
2026-11-02 19:00:43 +01:00

93 lines
1.5 KiB
QML

import QtQuick
import QtQuick.Layouts
import ZShell.Components
import ZShell
import ZShell.Services
import ZShell.Config
import qs.Components
import qs.Services
Item {
id: root
anchors.fill: parent
implicitWidth: ZUtils.snap(layout.implicitWidth + layout.anchors.margins * 2, root)
ServiceRef {
service: Storage
}
ServiceRef {
service: Memory
}
ServiceRef {
service: Cpu
}
ServiceRef {
service: Gpu
}
SnapLayout {
id: layout
orientation: Qt.Vertical
anchors.bottom: parent.bottom
anchors.margins: Tokens.padding.large
anchors.top: parent.top
x: ZUtils.snap((root.width - implicitWidth) / 2, root)
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
implicitSize: (root.height - layout.anchors.margins * 2 - layout.spacing * 4) / 5
Behavior on clampedVal {
Anim {}
}
MaterialIcon {
anchors.centerIn: parent
color: res.fgColor
text: res.icon
}
}
}