nosignal-shell/modules/dashboard/dash/Resources.qml
28allday 83c6b62c13 feat(nosignal): finish Nerd Font icon remap — core surfaces
Convert remaining reachable surfaces to NsIcon (launcher, utilities, windowinfo,
sidebar, dashboard, notification toast, shared controls IconTextButton/Menu/
SplitButton/ToggleButton/CollapsibleSection/CustomSpinBox, CoverArt). Handles
the `sourceComponent: MaterialIcon {` form and icon-via-alias controls.

- IconTextButton: alias -> plain `icon` property + bound NsIcon (cross-file alias
  to a custom property was rejected).
- Reverted IconButton `font:` (the controls-wide font->fontStyle sweep wrongly
  hit ButtonBase, which uses font not fontStyle).
- Glyphs map: +31 names (dashboard/utilities/launcher leftovers) — no "?" glyphs.

Old collapsed bar + old lock sub-components left as-is (unused, never render).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 12:59:28 +01:00

75 lines
1.5 KiB
QML

import QtQuick
import QtQuick.Layouts
import Caelestia.Config
import Caelestia.Services
import qs.components
import qs.components.controls
import qs.services
Item {
id: root
anchors.top: parent.top
anchors.bottom: parent.bottom
implicitWidth: layout.implicitWidth + layout.anchors.margins * 2
ServiceRef {
service: Cpu
}
ServiceRef {
service: Memory
}
ServiceRef {
service: Storage
}
ColumnLayout {
id: layout
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.margins: Tokens.padding.large
spacing: Tokens.spacing.medium
Resource {
icon: "memory"
value: Cpu.percentage
}
Resource {
icon: "memory_alt"
value: Memory.percentage
fgColour: Colours.palette.m3tertiary
}
Resource {
icon: "hard_disk"
value: Storage.percentage
fgColour: Colours.palette.m3secondary
}
}
component Resource: CircularProgress {
id: res
required property string icon
Layout.fillHeight: true
implicitSize: height
strokeWidth: Tokens.sizes.dashboard.resourceProgressThickness
Behavior on clampedVal {
Anim {}
}
NsIcon {
anchors.centerIn: parent
icon: res.icon
fontStyle: Tokens.font.icon.large
color: res.fgColour
}
}
}