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,6 +1,7 @@
|
|||
import QtQuick
|
||||
import "../services" as S
|
||||
import "../applets" as C
|
||||
import NovaStats as NS
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
@ -16,7 +17,7 @@ Item {
|
|||
property bool _revealed: false
|
||||
on_RawProgressChanged: if (_rawProgress >= 1)
|
||||
_revealed = true
|
||||
readonly property real _rawProgress: S.Theme.reducedMotion ? 1 : (screenWidth > 0 ? Math.max(0, Math.min(1, (wavePhase - screenWidth) / 500)) : 0)
|
||||
readonly property real _rawProgress: S.ThemeUtil.reducedMotion ? 1 : (screenWidth > 0 ? Math.max(0, Math.min(1, (wavePhase - screenWidth) / 500)) : 0)
|
||||
readonly property real _progress: (_revealed ? 1 : _rawProgress) * unlockFade
|
||||
opacity: _progress
|
||||
property real _slideX: (1 - _progress) * 80
|
||||
|
|
@ -38,11 +39,11 @@ Item {
|
|||
id: _weatherCard
|
||||
width: parent.width
|
||||
height: _weatherContent.implicitHeight + 16
|
||||
radius: S.Theme.radius + 2
|
||||
color: Qt.rgba(S.Theme.base01.r, S.Theme.base01.g, S.Theme.base01.b, 0.7)
|
||||
border.color: Qt.rgba(S.Theme.base03.r, S.Theme.base03.g, S.Theme.base03.b, 0.3)
|
||||
radius: NS.ThemeService.radius + 2
|
||||
color: Qt.rgba(NS.ThemeService.base01.r, NS.ThemeService.base01.g, NS.ThemeService.base01.b, 0.7)
|
||||
border.color: Qt.rgba(NS.ThemeService.base03.r, NS.ThemeService.base03.g, NS.ThemeService.base03.b, 0.3)
|
||||
border.width: 1
|
||||
visible: (S.Modules.lock.weather ?? true) && S.WeatherService.available
|
||||
visible: (NS.ModulesService.lockWeather ?? true) && S.WeatherService.available
|
||||
|
||||
C.WeatherApplet {
|
||||
id: _weatherContent
|
||||
|
|
@ -50,7 +51,7 @@ Item {
|
|||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 8
|
||||
accentColor: S.Theme.base0C
|
||||
accentColor: NS.ThemeService.base0C
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -65,11 +66,11 @@ Item {
|
|||
id: _mprisCard
|
||||
width: parent.width
|
||||
height: _mprisContent.implicitHeight + 16
|
||||
radius: S.Theme.radius + 2
|
||||
color: Qt.rgba(S.Theme.base01.r, S.Theme.base01.g, S.Theme.base01.b, 0.7)
|
||||
border.color: Qt.rgba(S.Theme.base03.r, S.Theme.base03.g, S.Theme.base03.b, 0.3)
|
||||
radius: NS.ThemeService.radius + 2
|
||||
color: Qt.rgba(NS.ThemeService.base01.r, NS.ThemeService.base01.g, NS.ThemeService.base01.b, 0.7)
|
||||
border.color: Qt.rgba(NS.ThemeService.base03.r, NS.ThemeService.base03.g, NS.ThemeService.base03.b, 0.3)
|
||||
border.width: 1
|
||||
visible: (S.Modules.lock.mpris ?? true) && S.MprisService.player !== null
|
||||
visible: (NS.ModulesService.lockMpris ?? true) && S.MprisService.player !== null
|
||||
|
||||
C.MprisApplet {
|
||||
id: _mprisContent
|
||||
|
|
@ -77,7 +78,7 @@ Item {
|
|||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 8
|
||||
accentColor: S.Theme.base0D
|
||||
accentColor: NS.ThemeService.base0D
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -86,11 +87,11 @@ Item {
|
|||
id: _volumeCard
|
||||
width: parent.width
|
||||
height: _volumeContent.implicitHeight + 16
|
||||
radius: S.Theme.radius + 2
|
||||
color: Qt.rgba(S.Theme.base01.r, S.Theme.base01.g, S.Theme.base01.b, 0.7)
|
||||
border.color: Qt.rgba(S.Theme.base03.r, S.Theme.base03.g, S.Theme.base03.b, 0.3)
|
||||
radius: NS.ThemeService.radius + 2
|
||||
color: Qt.rgba(NS.ThemeService.base01.r, NS.ThemeService.base01.g, NS.ThemeService.base01.b, 0.7)
|
||||
border.color: Qt.rgba(NS.ThemeService.base03.r, NS.ThemeService.base03.g, NS.ThemeService.base03.b, 0.3)
|
||||
border.width: 1
|
||||
visible: (S.Modules.lock.volume ?? true) && S.PipewireService.sink !== null
|
||||
visible: (NS.ModulesService.lockVolume ?? true) && S.PipewireService.sink !== null
|
||||
|
||||
C.VolumeApplet {
|
||||
id: _volumeContent
|
||||
|
|
@ -98,7 +99,7 @@ Item {
|
|||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 8
|
||||
accentColor: S.Theme.base0E
|
||||
accentColor: NS.ThemeService.base0E
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -107,9 +108,9 @@ Item {
|
|||
id: _backlightCard
|
||||
width: parent.width
|
||||
height: _backlightContent.implicitHeight + 8
|
||||
radius: S.Theme.radius + 2
|
||||
color: Qt.rgba(S.Theme.base01.r, S.Theme.base01.g, S.Theme.base01.b, 0.7)
|
||||
border.color: Qt.rgba(S.Theme.base03.r, S.Theme.base03.g, S.Theme.base03.b, 0.3)
|
||||
radius: NS.ThemeService.radius + 2
|
||||
color: Qt.rgba(NS.ThemeService.base01.r, NS.ThemeService.base01.g, NS.ThemeService.base01.b, 0.7)
|
||||
border.color: Qt.rgba(NS.ThemeService.base03.r, NS.ThemeService.base03.g, NS.ThemeService.base03.b, 0.3)
|
||||
border.width: 1
|
||||
visible: S.BacklightService.available
|
||||
|
||||
|
|
@ -120,7 +121,7 @@ Item {
|
|||
anchors.top: parent.top
|
||||
anchors.topMargin: 4
|
||||
percent: S.BacklightService.percent
|
||||
accentColor: S.Theme.base0A
|
||||
accentColor: NS.ThemeService.base0A
|
||||
onSetPercent: pct => S.BacklightService.setPercent(pct)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue