hand styling to stylix

This commit is contained in:
lucy 2026-10-20 10:31:54 +02:00
commit 57896a5a47
6 changed files with 52 additions and 34 deletions

View file

@ -7,35 +7,56 @@ import qs.settings
Singleton { Singleton {
id: root id: root
property alias c: colors property alias c: colorsProxy
property color accent: colors[Config.cfg.appearance.accent] property string font: colorsProxy.base06
property string font: colors.base06 property string accent: colorsProxy[Config.cfg.appearance.accent]
QtObject {
id: colorsProxy
property string base00: "#" + colors.base00
property string base01: "#" + colors.base01
property string base02: "#" + colors.base02
property string base03: "#" + colors.base03
property string base04: "#" + colors.base04
property string base05: "#" + colors.base05
property string base06: "#" + colors.base06
property string base07: "#" + colors.base07
property string base08: "#" + colors.base08
property string base09: "#" + colors.base09
property string base0A: "#" + colors.base0A
property string base0B: "#" + colors.base0B
property string base0C: "#" + colors.base0C
property string base0D: "#" + colors.base0D
property string base0E: "#" + colors.base0E
property string base0F: "#" + colors.base0F
}
FileView { FileView {
id: colorView id: colorView
path: Qt.resolvedUrl(Quickshell.shellDir + "/schemes/" + Config.cfg.appearance.currentTheme) path: Qt.resolvedUrl("/home/lucy/.config/stylix/palette.json")
onFileChanged: { onFileChanged: {
reload(); reload();
} }
watchChanges: true watchChanges: true
adapter: JsonAdapter { adapter: JsonAdapter {
id: colors id: colors
property color base00 property string base00
property color base01 property string base01
property color base02 property string base02
property color base03 property string base03
property color base04 property string base04
property color base05 property string base05
property color base06 property string base06
property color base07 property string base07
property color base08 property string base08
property color base09 property string base09
property color base0A property string base0A
property color base0B property string base0B
property color base0C property string base0C
property color base0D property string base0D
property color base0E property string base0E
property color base0F property string base0F
} }
} }
} }

View file

@ -12,7 +12,7 @@ import QtQuick.Controls
Rectangle { Rectangle {
id: root id: root
color: Colors.c.base01 color: Colors.c.base00
radius: Config.cfg.appearance.rounding - 4 radius: Config.cfg.appearance.rounding - 4
implicitWidth: audioLayout.implicitWidth + 10 implicitWidth: audioLayout.implicitWidth + 10
implicitHeight: audioLayout.implicitHeight + 10 implicitHeight: audioLayout.implicitHeight + 10

View file

@ -25,11 +25,11 @@ Variants {
Rectangle { Rectangle {
color: Colors.c.base00 color: Colors.c.base00
radius: Config.cfg.bar.floating ? Config.cfg.appearance.rounding : 0 radius: Config.cfg.bar.floating ? Config.cfg.appearance.rounding : 0
anchors.fill: parent anchors.fill: parent
implicitHeight: parent.height implicitHeight: parent.height
anchors.centerIn: parent anchors.centerIn: parent
RowLayout { RowLayout {
anchors.leftMargin: 4 anchors.leftMargin: 4
anchors.left: parent.left anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
Ws { Ws {
@ -42,12 +42,9 @@ Variants {
RowLayout { RowLayout {
anchors.centerIn: parent anchors.centerIn: parent
Date {} Date {}
ColorPickerButton {
barScreen: root.modelData
}
} }
RowLayout { RowLayout {
anchors.rightMargin: 4 anchors.rightMargin: 4
anchors.right: parent.right anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
Mpris { Mpris {

View file

@ -1,7 +1,7 @@
{ {
"appearance": { "appearance": {
"accent": "base0D", "accent": "base0D",
"currentTheme": "base16-gruvbox-dark-hard.json", "currentTheme": "base16-gruvbox-dark.json",
"font": "Inter", "font": "Inter",
"fontSize": 14, "fontSize": 14,
"iconSize": 16, "iconSize": 16,
@ -14,6 +14,6 @@
}, },
"wallpaper": { "wallpaper": {
"wallDir": "/home/lucy/.walls/", "wallDir": "/home/lucy/.walls/",
"wallpaper": "/home/lucy/.walls/lain_room.png" "wallpaper": "/home/lucy/.walls/walkingcastle.png"
} }
} }

View file

@ -4,7 +4,7 @@ import qs
import qs.settings import qs.settings
Rectangle { Rectangle {
property color base: Qt.rgba(Colors.accent.r, Colors.accent.g, Colors.accent.b, active ? 0.3 : 0.17) property color base: active ? Colors.c.base02 : Colors.c.base01
property bool active: false property bool active: false
color: base color: base
implicitHeight: Config.cfg.bar.height - 8 implicitHeight: Config.cfg.bar.height - 8

View file

@ -15,7 +15,7 @@ Slider {
width: control.availableWidth width: control.availableWidth
height: implicitHeight height: implicitHeight
radius: 2 radius: 2
color: Colors.c.base01 color: Colors.c.base00
Rectangle { Rectangle {
width: control.visualPosition * parent.width width: control.visualPosition * parent.width