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
|
||||
|
||||
// NOT safe for lock screen - can toggle bluetooth power and connect/disconnect devices
|
||||
Column {
|
||||
|
|
@ -20,9 +21,9 @@ Column {
|
|||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "\uF011"
|
||||
color: S.BluetoothService.enabled ? root.accentColor : S.Theme.base04
|
||||
font.pixelSize: S.Theme.fontSize
|
||||
font.family: S.Theme.iconFontFamily
|
||||
color: S.BluetoothService.enabled ? root.accentColor : NS.ThemeService.base04
|
||||
font.pixelSize: NS.ThemeService.fontSize
|
||||
font.family: NS.ThemeService.iconFontFamily
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
|
|
@ -57,9 +58,9 @@ Column {
|
|||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "\uF294"
|
||||
color: entry._pending || entry.modelData.connected ? root.accentColor : S.Theme.base04
|
||||
font.pixelSize: S.Theme.fontSize + 1
|
||||
font.family: S.Theme.iconFontFamily
|
||||
color: entry._pending || entry.modelData.connected ? root.accentColor : NS.ThemeService.base04
|
||||
font.pixelSize: NS.ThemeService.fontSize + 1
|
||||
font.family: NS.ThemeService.iconFontFamily
|
||||
}
|
||||
|
||||
Text {
|
||||
|
|
@ -69,9 +70,9 @@ Column {
|
|||
anchors.rightMargin: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: entry.modelData.name
|
||||
color: entry._pending || entry.modelData.connected ? root.accentColor : S.Theme.base05
|
||||
font.pixelSize: S.Theme.fontSize
|
||||
font.family: S.Theme.fontFamily
|
||||
color: entry._pending || entry.modelData.connected ? root.accentColor : NS.ThemeService.base05
|
||||
font.pixelSize: NS.ThemeService.fontSize
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
font.bold: entry.modelData.connected || entry._pending
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
|
@ -82,9 +83,9 @@ Column {
|
|||
anchors.rightMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: entry._pending ? (entry.modelData.connected ? "disconnecting..." : "connecting...") : (entry.modelData.battery >= 0 ? entry.modelData.battery + "%" : "")
|
||||
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
|
||||
font.italic: entry._pending
|
||||
width: text ? implicitWidth : 0
|
||||
}
|
||||
|
|
@ -92,7 +93,7 @@ Column {
|
|||
// Pulse animation while pending
|
||||
SequentialAnimation on opacity {
|
||||
loops: Animation.Infinite
|
||||
running: entry._pending && !S.Theme.reducedMotion
|
||||
running: entry._pending && !S.ThemeUtil.reducedMotion
|
||||
NumberAnimation {
|
||||
to: 0.5
|
||||
duration: 400
|
||||
|
|
@ -121,8 +122,8 @@ Column {
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: S.BluetoothService.enabled ? "No paired devices" : "Bluetooth 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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue