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
|
||||
|
||||
// Collapsible card for the applet dock.
|
||||
// Set icon, title, and place applet content as children.
|
||||
|
|
@ -9,20 +10,20 @@ Rectangle {
|
|||
property string icon: ""
|
||||
property string title: ""
|
||||
property bool expanded: false
|
||||
property color accentColor: S.Theme.base0C
|
||||
property color accentColor: NS.ThemeService.base0C
|
||||
|
||||
default property alias content: _contentColumn.children
|
||||
|
||||
width: parent?.width ?? 300
|
||||
height: _header.height + (_contentColumn.visible ? _contentColumn.height : 0)
|
||||
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
|
||||
clip: true
|
||||
|
||||
Behavior on height {
|
||||
enabled: !S.Theme.reducedMotion
|
||||
enabled: !S.ThemeUtil.reducedMotion
|
||||
NumberAnimation {
|
||||
duration: 150
|
||||
easing.type: Easing.OutCubic
|
||||
|
|
@ -41,8 +42,8 @@ Rectangle {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: root.icon
|
||||
color: root.accentColor
|
||||
font.pixelSize: S.Theme.fontSize
|
||||
font.family: S.Theme.iconFontFamily
|
||||
font.pixelSize: NS.ThemeService.fontSize
|
||||
font.family: NS.ThemeService.iconFontFamily
|
||||
}
|
||||
|
||||
Text {
|
||||
|
|
@ -50,10 +51,10 @@ Rectangle {
|
|||
anchors.leftMargin: 30
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: root.title
|
||||
color: S.Theme.base05
|
||||
font.pixelSize: S.Theme.fontSize - 1
|
||||
color: NS.ThemeService.base05
|
||||
font.pixelSize: NS.ThemeService.fontSize - 1
|
||||
font.bold: true
|
||||
font.family: S.Theme.fontFamily
|
||||
font.family: NS.ThemeService.fontFamily
|
||||
}
|
||||
|
||||
Text {
|
||||
|
|
@ -61,9 +62,9 @@ Rectangle {
|
|||
anchors.rightMargin: 10
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: root.expanded ? "\uF078" : "\uF054"
|
||||
color: S.Theme.base04
|
||||
font.pixelSize: S.Theme.fontSize - 2
|
||||
font.family: S.Theme.iconFontFamily
|
||||
color: NS.ThemeService.base04
|
||||
font.pixelSize: NS.ThemeService.fontSize - 2
|
||||
font.family: NS.ThemeService.iconFontFamily
|
||||
|
||||
Behavior on text {
|
||||
enabled: false
|
||||
|
|
@ -84,7 +85,7 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 1
|
||||
color: S.Theme.base03
|
||||
color: NS.ThemeService.base03
|
||||
opacity: root.expanded ? 0.5 : 0
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue