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
85 lines
1.4 KiB
QML
85 lines
1.4 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import M3Shapes
|
|
import ZShell.Services
|
|
import ZShell.Config
|
|
import qs.Components
|
|
import qs.Effects
|
|
import qs.Services
|
|
|
|
CustomRect {
|
|
id: root
|
|
|
|
readonly property real fontScale: {
|
|
const diff = width / 391 - 1; // 391 is the width at 1080 height screen
|
|
return 1 + Math.pow(Math.abs(diff), 0.8) * Math.sign(diff);
|
|
}
|
|
|
|
color: Colors.tPalette.m3surfaceContainer
|
|
implicitHeight: layout.implicitHeight + layout.anchors.margins * 2
|
|
radius: Tokens.rounding.small
|
|
|
|
ServiceRef {
|
|
service: Cpu
|
|
}
|
|
|
|
ServiceRef {
|
|
service: Memory
|
|
}
|
|
|
|
ServiceRef {
|
|
service: Storage
|
|
}
|
|
|
|
RowLayout {
|
|
id: layout
|
|
|
|
anchors.fill: parent
|
|
anchors.margins: Tokens.padding.large
|
|
spacing: Tokens.spacing.largeIncreased
|
|
|
|
Resource {
|
|
id: cpu
|
|
|
|
fgColor: Colors.palette.m3primary
|
|
icon: "memory"
|
|
value: Cpu.percentage
|
|
}
|
|
|
|
Resource {
|
|
fgColor: Colors.palette.m3tertiary
|
|
icon: "memory_alt"
|
|
value: Memory.percentage
|
|
}
|
|
|
|
Resource {
|
|
fgColor: Colors.palette.m3secondary
|
|
icon: "hard_disk"
|
|
value: Storage.percentage
|
|
}
|
|
}
|
|
|
|
component Resource: CircularProgress {
|
|
id: res
|
|
|
|
required property string icon
|
|
|
|
Layout.fillWidth: true
|
|
implicitSize: width
|
|
|
|
Behavior on clampedVal {
|
|
Anim {
|
|
}
|
|
}
|
|
|
|
MaterialIcon {
|
|
anchors.centerIn: parent
|
|
color: res.fgColor
|
|
font.pointSize: Tokens.font.size.extraLarge
|
|
text: res.icon
|
|
}
|
|
}
|
|
}
|