plugin: rust-side modules + theme services with serde-typed config
This commit is contained in:
parent
a86e90e927
commit
f34f3f2f4e
95 changed files with 2477 additions and 1011 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import QtQuick
|
||||
import "../services" as S
|
||||
import NovaStats as NS
|
||||
|
||||
Column {
|
||||
id: root
|
||||
|
|
@ -14,7 +15,7 @@ Column {
|
|||
property bool active: true
|
||||
property string deviceFilter: ""
|
||||
|
||||
property color stateColor: temp > hot ? S.Theme.base08 : temp > warm ? S.Theme.base0A : root.accentColor
|
||||
property color stateColor: temp > hot ? NS.ThemeService.base08 : temp > warm ? NS.ThemeService.base0A : root.accentColor
|
||||
Behavior on stateColor {
|
||||
ColorAnimation {
|
||||
duration: 300
|
||||
|
|
@ -32,8 +33,8 @@ Column {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: root.temp + "\u00B0C"
|
||||
color: root.stateColor
|
||||
font.pixelSize: S.Theme.fontSize
|
||||
font.family: S.Theme.fontFamily
|
||||
font.pixelSize: NS.ThemeService.fontSize
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
font.bold: true
|
||||
width: _tempSizer.implicitWidth
|
||||
horizontalAlignment: Text.AlignRight
|
||||
|
|
@ -63,7 +64,7 @@ Column {
|
|||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: S.Theme.base02
|
||||
color: NS.ThemeService.base02
|
||||
radius: 3
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +88,7 @@ Column {
|
|||
width: 1
|
||||
height: parent.height + 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: S.Theme.base0A
|
||||
color: NS.ThemeService.base0A
|
||||
opacity: 0.6
|
||||
}
|
||||
|
||||
|
|
@ -97,7 +98,7 @@ Column {
|
|||
width: 1
|
||||
height: parent.height + 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: S.Theme.base08
|
||||
color: NS.ThemeService.base08
|
||||
opacity: 0.6
|
||||
}
|
||||
}
|
||||
|
|
@ -116,11 +117,11 @@ Column {
|
|||
thresholds: [
|
||||
{
|
||||
value: root.warm,
|
||||
color: S.Theme.base0A
|
||||
color: NS.ThemeService.base0A
|
||||
},
|
||||
{
|
||||
value: root.hot,
|
||||
color: S.Theme.base08
|
||||
color: NS.ThemeService.base08
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -135,9 +136,9 @@ Column {
|
|||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "warm " + root.warm + "\u00B0 hot " + root.hot + "\u00B0"
|
||||
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: 0.5
|
||||
}
|
||||
|
||||
|
|
@ -146,9 +147,9 @@ Column {
|
|||
anchors.rightMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "10 min"
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -179,9 +180,9 @@ Column {
|
|||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: modelData.name
|
||||
color: _isActive ? root.accentColor : S.Theme.base04
|
||||
font.pixelSize: S.Theme.fontSize - 2
|
||||
font.family: S.Theme.fontFamily
|
||||
color: _isActive ? root.accentColor : NS.ThemeService.base04
|
||||
font.pixelSize: NS.ThemeService.fontSize - 2
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
elide: Text.ElideRight
|
||||
width: parent.width - 80
|
||||
}
|
||||
|
|
@ -191,9 +192,9 @@ Column {
|
|||
anchors.rightMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: modelData.celsius + "\u00B0C"
|
||||
color: S.Theme.loadColor(modelData.celsius)
|
||||
font.pixelSize: S.Theme.fontSize - 2
|
||||
font.family: S.Theme.fontFamily
|
||||
color: S.ThemeUtil.loadColor(modelData.celsius)
|
||||
font.pixelSize: NS.ThemeService.fontSize - 2
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
font.bold: _isActive
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue