add functioning theme picker and overhaul theming system
This commit is contained in:
parent
20b8012b78
commit
64a269816d
680 changed files with 6166 additions and 5969 deletions
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
pragma ComponentBehavior: Bound
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
|
|
@ -13,11 +13,11 @@ Rectangle {
|
|||
id: child
|
||||
implicitWidth: 800
|
||||
implicitHeight: 600
|
||||
color: Colors.base01
|
||||
color: Colors.c.base01
|
||||
radius: Config.cfg.appearance.rounding
|
||||
MouseArea {
|
||||
acceptedButtons: Qt.AllButtons
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.AllButtons
|
||||
anchors.fill: parent
|
||||
}
|
||||
Process {
|
||||
id: getSchemes
|
||||
|
|
@ -34,13 +34,13 @@ Rectangle {
|
|||
anchors.fill: parent
|
||||
anchors.centerIn: parent
|
||||
anchors.margins: 10
|
||||
radius: Config.cfg.appearance.rounding
|
||||
color: Colors.base01
|
||||
radius: Config.cfg.appearance.rounding
|
||||
color: Colors.c.base01
|
||||
clip: true
|
||||
RowLayout {
|
||||
id: contentLayout
|
||||
anchors.fill: parent
|
||||
anchors.margins: 30
|
||||
anchors.margins: 30
|
||||
ListView {
|
||||
id: schemeList
|
||||
spacing: 5
|
||||
|
|
@ -50,7 +50,7 @@ Rectangle {
|
|||
delegate: Rectangle {
|
||||
id: container
|
||||
required property string modelData
|
||||
color: Colors.base02
|
||||
color: Colors.c.base02
|
||||
height: 30
|
||||
radius: Config.cfg.appearance.rounding
|
||||
implicitWidth: 300
|
||||
|
|
@ -67,6 +67,7 @@ Rectangle {
|
|||
onClicked: {
|
||||
setTheme.themeName = modelData;
|
||||
setTheme.running = true;
|
||||
Config.cfg.appearance.currentTheme = modelData;
|
||||
}
|
||||
Process {
|
||||
id: setTheme
|
||||
|
|
@ -78,15 +79,7 @@ Rectangle {
|
|||
}
|
||||
StyledText {
|
||||
id: currentScheme
|
||||
text: ""
|
||||
Process {
|
||||
id: getCurrentScheme
|
||||
command: ["tinty", "current"]
|
||||
running: true
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: currentScheme.text = text
|
||||
}
|
||||
}
|
||||
text: Config.cfg.appearance.currentTheme
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import QtQuick.Controls
|
|||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: Colors.barBg
|
||||
color: Colors.c.base00
|
||||
radius: Config.cfg.appearance.rounding
|
||||
implicitWidth: audioLayout.implicitWidth + 10
|
||||
implicitHeight: audioLayout.implicitHeight + 10
|
||||
|
|
@ -33,7 +33,7 @@ Rectangle {
|
|||
delegate: Rectangle {
|
||||
id: audioDelContainer
|
||||
Layout.fillWidth: true
|
||||
color: Colors.moduleBg
|
||||
color: Colors.c.base02
|
||||
radius: Config.cfg.appearance.rounding / 1.5
|
||||
required property var modelData
|
||||
implicitHeight: audioRow.implicitHeight + 8
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Rectangle {
|
|||
Rectangle {
|
||||
id: container
|
||||
anchors.fill: parent
|
||||
color: Colors.base02
|
||||
color: Colors.c.base00
|
||||
radius: Config.cfg.appearance.rounding
|
||||
GridView {
|
||||
id: wallpaperLayout
|
||||
|
|
|
|||
|
|
@ -23,13 +23,13 @@ Variants {
|
|||
margins.left: Config.cfg.bar.floating ? 10 : 0
|
||||
margins.right: Config.cfg.bar.floating ? 10 : 0
|
||||
Rectangle {
|
||||
color: Colors.barBg
|
||||
color: Colors.c.base00
|
||||
radius: Config.cfg.bar.floating ? Config.cfg.appearance.rounding : 0
|
||||
anchors.fill: parent
|
||||
implicitHeight: parent.height
|
||||
anchors.centerIn: parent
|
||||
RowLayout {
|
||||
anchors.leftMargin: 10
|
||||
anchors.leftMargin: 4
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Ws {
|
||||
|
|
@ -47,45 +47,26 @@ Variants {
|
|||
}
|
||||
}
|
||||
RowLayout {
|
||||
anchors.rightMargin: 10
|
||||
anchors.rightMargin: 4
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Mpris {
|
||||
id: mpris
|
||||
}
|
||||
StyledText {
|
||||
text: "|"
|
||||
visible: mpris.visible
|
||||
}
|
||||
Bat {
|
||||
id: bat
|
||||
}
|
||||
StyledText {
|
||||
text: "|"
|
||||
visible: bat.visible
|
||||
}
|
||||
Tray {
|
||||
id: tray
|
||||
}
|
||||
StyledText {
|
||||
text: "|"
|
||||
visible: tray.visible
|
||||
}
|
||||
WallPickerButton {
|
||||
id: wpButton
|
||||
barScreen: root.modelData
|
||||
}
|
||||
StyledText {
|
||||
text: "|"
|
||||
}
|
||||
|
||||
Pw {
|
||||
id: pw
|
||||
barScreen: root.modelData
|
||||
}
|
||||
StyledText {
|
||||
text: "|"
|
||||
}
|
||||
Netstatus {
|
||||
id: net
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ import qs.modules.applets
|
|||
import qs.settings
|
||||
|
||||
BarComponent {
|
||||
implicitWidth: text.width
|
||||
implicitWidth: 16
|
||||
required property ShellScreen barScreen
|
||||
StyledText {
|
||||
StyledIcon {
|
||||
id: text
|
||||
anchors.centerIn: parent
|
||||
text: "temp!!!"
|
||||
iconName: "games-config-theme"
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
MouseArea {
|
||||
id: clickHandler
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@ import QtQuick.Layouts
|
|||
|
||||
BarComponent {
|
||||
id: root
|
||||
implicitWidth: networkLayout.implicitWidth
|
||||
implicitWidth: networkLayout.implicitWidth + 16
|
||||
RowLayout {
|
||||
id: networkLayout
|
||||
anchors.centerIn: root
|
||||
anchors.fill: root
|
||||
spacing: 5
|
||||
StyledIcon {
|
||||
iconName: Network.getWifiIcon()
|
||||
|
|
|
|||
|
|
@ -9,10 +9,11 @@ import qs.settings
|
|||
BarComponent {
|
||||
id: root
|
||||
required property ShellScreen barScreen
|
||||
implicitWidth: wsLayout.implicitWidth
|
||||
implicitWidth: 10 * (16 + 4)
|
||||
RowLayout {
|
||||
id: wsLayout
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 4
|
||||
Repeater {
|
||||
model: WindowManager.screenProjection(root.barScreen).windowsets
|
||||
|
|
@ -21,7 +22,7 @@ BarComponent {
|
|||
required property var modelData
|
||||
implicitWidth: 16
|
||||
implicitHeight: implicitWidth
|
||||
color: modelData.active ? Colors.accent : 'transparent'
|
||||
color: modelData.active ? Colors.c.base0D : 'transparent'
|
||||
MouseArea {
|
||||
id: clickHandler
|
||||
anchors.fill: parent
|
||||
|
|
@ -33,7 +34,7 @@ BarComponent {
|
|||
id: wsText
|
||||
anchors.centerIn: parent
|
||||
text: parent.modelData.name
|
||||
color: parent.modelData.shouldDisplay ? parent.modelData.active ? Colors.base00 : Colors.base05 : Colors.base03
|
||||
color: parent.modelData.shouldDisplay ? parent.modelData.active ? Colors.c.base00 : Colors.c.base05 : Colors.c.base03
|
||||
font.bold: parent.modelData.active
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ WrapperRectangle {
|
|||
implicitHeight: 100
|
||||
radius: Config.cfg.appearance.rounding
|
||||
anchors.right: parent?.right
|
||||
color: Colors.barBg
|
||||
color: Colors.c.base00
|
||||
clip: true
|
||||
Timer {
|
||||
id: dismissTimer
|
||||
|
|
@ -80,10 +80,10 @@ WrapperRectangle {
|
|||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
root.color = Colors.base03;
|
||||
root.color = Colors.c.base01;
|
||||
}
|
||||
onExited: {
|
||||
root.color = Colors.base01;
|
||||
root.color = Colors.c.base00
|
||||
}
|
||||
onClicked: {
|
||||
if (root.notification?.tracked) root.notification.dismiss();
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ Variants {
|
|||
}
|
||||
}
|
||||
WlrLayershell.keyboardFocus: shown ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
|
||||
aboveWindows: true
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue