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

@ -2,6 +2,7 @@ import QtQuick
import Quickshell
import "." as M
import "../services" as S
import NovaStats as NS
M.HoverPanel {
id: menuWindow
@ -29,8 +30,8 @@ M.HoverPanel {
anchors.fill: parent
anchors.leftMargin: 4
anchors.rightMargin: 4
color: backArea.containsMouse ? S.Theme.base02 : "transparent"
radius: S.Theme.radius
color: backArea.containsMouse ? NS.ThemeService.base02 : "transparent"
radius: NS.ThemeService.radius
}
Text {
@ -38,9 +39,9 @@ M.HoverPanel {
anchors.left: parent.left
anchors.leftMargin: 12
text: "\u2039 Back"
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.fontFamily
color: NS.ThemeService.base05
font.pixelSize: NS.ThemeService.fontSize
font.family: NS.ThemeService.fontFamily
}
MouseArea {
@ -74,7 +75,7 @@ M.HoverPanel {
anchors.leftMargin: 8
anchors.rightMargin: 8
height: 1
color: S.Theme.base03
color: NS.ThemeService.base03
}
Rectangle {
@ -82,8 +83,8 @@ M.HoverPanel {
anchors.fill: parent
anchors.leftMargin: 4
anchors.rightMargin: 4
color: rowArea.containsMouse && entryItem.modelData.enabled ? S.Theme.base02 : "transparent"
radius: S.Theme.radius
color: rowArea.containsMouse && entryItem.modelData.enabled ? NS.ThemeService.base02 : "transparent"
radius: NS.ThemeService.radius
}
M.ThemedIcon {
@ -92,8 +93,8 @@ M.HoverPanel {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 12
width: S.Theme.fontSize
height: S.Theme.fontSize
width: NS.ThemeService.fontSize
height: NS.ThemeService.fontSize
source: entryItem.modelData.icon
tint: menuWindow.accentColor
fillMode: Image.PreserveAspectFit
@ -107,9 +108,9 @@ M.HoverPanel {
anchors.right: entryChevron.visible ? entryChevron.left : parent.right
anchors.rightMargin: entryChevron.visible ? 4 : 12
text: entryItem.modelData.text
color: entryItem.modelData.enabled ? S.Theme.base05 : S.Theme.base03
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.fontFamily
color: entryItem.modelData.enabled ? NS.ThemeService.base05 : NS.ThemeService.base03
font.pixelSize: NS.ThemeService.fontSize
font.family: NS.ThemeService.fontFamily
elide: Text.ElideRight
}
@ -120,9 +121,9 @@ M.HoverPanel {
anchors.right: parent.right
anchors.rightMargin: 12
text: "\u203A"
color: entryItem.modelData.enabled ? S.Theme.base05 : S.Theme.base03
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.fontFamily
color: entryItem.modelData.enabled ? NS.ThemeService.base05 : NS.ThemeService.base03
font.pixelSize: NS.ThemeService.fontSize
font.family: NS.ThemeService.fontFamily
}
MouseArea {