plugin: rust-side modules + theme services with serde-typed config

This commit is contained in:
Damocles 2026-05-04 22:58:12 +02:00
parent a86e90e927
commit f34f3f2f4e
95 changed files with 2477 additions and 1011 deletions

View file

@ -1,5 +1,6 @@
import QtQuick
import "../services" as S
import NovaStats as NS
Column {
id: root
@ -35,7 +36,7 @@ Column {
Rectangle {
anchors.fill: parent
color: S.Theme.base02
color: NS.ThemeService.base02
radius: 3
}
@ -43,7 +44,7 @@ Column {
Rectangle {
width: parent.width * Math.min(1, (root.usedGb + root.cachedGb) / Math.max(root.totalGb, 0.001))
height: parent.height
color: S.Theme.base0D
color: NS.ThemeService.base0D
opacity: 0.4
radius: 3
Behavior on width {
@ -97,7 +98,7 @@ Column {
height: 32
history: S.SystemStats.memHistory
strokeColor: root.accentColor
colorAt: v => S.Theme.loadColor(v)
colorAt: v => S.ThemeUtil.loadColor(v)
active: root.active
}
@ -117,9 +118,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "PROCESS"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
color: NS.ThemeService.base03
font.pixelSize: NS.ThemeService.fontSize - 3
font.family: NS.ThemeService.fontFamily
font.letterSpacing: 1
}
@ -128,9 +129,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "MEM"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
color: NS.ThemeService.base03
font.pixelSize: NS.ThemeService.fontSize - 3
font.family: NS.ThemeService.fontFamily
font.letterSpacing: 1
}
}
@ -148,9 +149,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.cmd
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: NS.ThemeService.base05
font.pixelSize: NS.ThemeService.fontSize - 2
font.family: NS.ThemeService.fontFamily
elide: Text.ElideRight
width: parent.width - 80
}
@ -160,9 +161,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.mem.toFixed(1) + "%"
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: NS.ThemeService.base04
font.pixelSize: NS.ThemeService.fontSize - 2
font.family: NS.ThemeService.fontFamily
width: 36
horizontalAlignment: Text.AlignRight
}