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
// NOT safe for lock screen - can toggle wifi and connect/disconnect networks
Column {
@ -20,9 +21,9 @@ Column {
Text {
anchors.centerIn: parent
text: "\uF011"
color: S.NetworkService.wifiEnabled ? root.accentColor : S.Theme.base04
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.iconFontFamily
color: S.NetworkService.wifiEnabled ? root.accentColor : NS.ThemeService.base04
font.pixelSize: NS.ThemeService.fontSize
font.family: NS.ThemeService.iconFontFamily
Behavior on color {
ColorAnimation {
@ -55,9 +56,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: entry.modelData.isWifi ? "\uF1EB" : "\uDB80\uDE00"
color: entry.modelData.active ? root.accentColor : S.Theme.base05
font.pixelSize: S.Theme.fontSize + 1
font.family: S.Theme.iconFontFamily
color: entry.modelData.active ? root.accentColor : NS.ThemeService.base05
font.pixelSize: NS.ThemeService.fontSize + 1
font.family: NS.ThemeService.iconFontFamily
}
Text {
@ -67,9 +68,9 @@ Column {
anchors.rightMargin: 4
anchors.verticalCenter: parent.verticalCenter
text: entry.modelData.name
color: entry.modelData.active ? root.accentColor : S.Theme.base05
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.fontFamily
color: entry.modelData.active ? root.accentColor : NS.ThemeService.base05
font.pixelSize: NS.ThemeService.fontSize
font.family: NS.ThemeService.fontFamily
font.bold: entry.modelData.active
elide: Text.ElideRight
}
@ -80,9 +81,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: entry.modelData.signal >= 0 ? entry.modelData.signal + "%" : ""
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 1
font.family: S.Theme.fontFamily
color: NS.ThemeService.base04
font.pixelSize: NS.ThemeService.fontSize - 1
font.family: NS.ThemeService.fontFamily
width: entry.modelData.signal >= 0 ? implicitWidth : 0
}
@ -102,8 +103,8 @@ Column {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: S.NetworkService.wifiEnabled ? "No networks available" : "Wi-Fi is off"
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.fontFamily
color: NS.ThemeService.base04
font.pixelSize: NS.ThemeService.fontSize
font.family: NS.ThemeService.fontFamily
}
}