Krolyxon
Commit 8fda16f

Branches

Refs →

aurora.configquickshellauroraSetAppearance.qml

100 lines · 3.7 KB · QML

1import QtQuick
2import QtQuick.Layouts
3
4// Settings app > Appearance: wallpaper, colour scheme, sizes and transparency (all in Settings, applied live).
5Flickable {
6 id: flick
7 signal overlayRequested(string name)
8 clip: true
9 contentWidth: width
10 contentHeight: col.implicitHeight
11 boundsBehavior: Flickable.StopAtBounds
12
13 Component.onCompleted: Wall.refresh()
14
15 ColumnLayout {
16 id: col
17 width: flick.width
18 spacing: 10
19
20 SectionLabel { text: "wallpaper" }
21 Text {
22 Layout.fillWidth: true
23 text: Wall.current !== "" ? Wall.current.replace(Wall.home, "~") : "-"
24 elide: Text.ElideLeft
25 color: Theme.dim
26 font.family: Theme.font
27 font.pixelSize: Theme.fontSize - 1
28 }
29 RowLayout {
30 Layout.fillWidth: true
31 spacing: 6
32 IconBtn {
33 Layout.fillWidth: true
34 icon: Theme.iImage
35 label: "open picker"
36 onClicked: flick.overlayRequested("wall")
37 }
38 IconBtn {
39 Layout.fillWidth: true
40 icon: Theme.iShuffle
41 label: "random from folder"
42 onClicked: Wall.random()
43 }
44 }
45 Text {
46 text: "random picks from"
47 color: Theme.fg
48 font.family: Theme.font
49 font.pixelSize: Theme.fontSize
50 }
51 Flow {
52 Layout.fillWidth: true
53 spacing: 4
54 Repeater {
55 model: [""].concat(Wall.folders)
56 delegate: IconBtn {
57 required property string modelData
58 implicitHeight: 26
59 label: modelData === "" ? "all" : modelData
60 active: Settings.wallFolder === modelData
61 onClicked: Settings.wallFolder = modelData
62 }
63 }
64 }
65
66 SectionLabel { text: "colours" }
67 Text {
68 Layout.fillWidth: true
69 text: "matugen scheme from the wallpaper, accent = its primary"
70 elide: Text.ElideRight
71 color: Theme.dim
72 font.family: Theme.font
73 font.pixelSize: Theme.fontSize - 1
74 }
75 Flow {
76 Layout.fillWidth: true
77 spacing: 4
78 Repeater {
79 model: ["tonal-spot", "vibrant", "expressive", "fidelity", "content", "fruit-salad", "rainbow", "neutral", "monochrome"]
80 delegate: IconBtn {
81 required property string modelData
82 implicitHeight: 26
83 label: modelData
84 active: Settings.matuScheme === "scheme-" + modelData
85 onClicked: Settings.matuScheme = "scheme-" + modelData
86 }
87 }
88 }
89 Knob { label: "contrast"; from: -1; to: 1; decimals: 2; value: Settings.matuContrast; onMoved: v => Settings.matuContrast = v }
90
91 SectionLabel { text: "sizes" }
92 Knob { label: "font size"; from: 9; to: 18; value: Settings.fontSize; onMoved: v => Settings.fontSize = v }
93 Knob { label: "workspace icons"; from: 8; to: 18; value: Settings.wsFontSize; onMoved: v => Settings.wsFontSize = v }
94 Knob { label: "bar height"; from: 16; to: 36; value: Settings.barHeight; onMoved: v => Settings.barHeight = v }
95
96 SectionLabel { text: "transparency" }
97 Knob { label: "bar opacity"; from: 0.3; to: 1; decimals: 2; value: Settings.barAlpha; onMoved: v => Settings.barAlpha = v }
98 Knob { label: "panel opacity"; from: 0.3; to: 1; decimals: 2; value: Settings.panelAlpha; onMoved: v => Settings.panelAlpha = v }
99 }
100}