Krolyxon
Commit 6a3e480

Branches

Refs →

aurora.configquickshellauroraSetAppearance.qml

144 lines · 6.5 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"; keywords: "background image picture" }
21 Text {
22 Layout.fillWidth: true
23 Layout.leftMargin: 18
24 text: Wall.current !== "" ? Wall.current.replace(Wall.home, "~") : "-"
25 elide: Text.ElideLeft
26 color: Theme.fgDim
27 font.family: Theme.ui
28 font.pixelSize: 14
29 }
30 RowLayout {
31 Layout.fillWidth: true
32 spacing: 6
33 IconBtn {
34 Layout.fillWidth: true
35 icon: Theme.iImage
36 label: "open picker"
37 keywords: "wallpaper picker choose background"
38 onClicked: flick.overlayRequested("wall")
39 }
40 IconBtn {
41 Layout.fillWidth: true
42 icon: Theme.iShuffle
43 label: "random from folder"
44 keywords: "shuffle random wallpaper background"
45 onClicked: Wall.random()
46 }
47 }
48 Text {
49 text: "random picks from"
50 color: Theme.fg
51 font.family: Theme.ui
52 font.pixelSize: 15
53 }
54 Flow {
55 Layout.fillWidth: true
56 spacing: 4
57 Repeater {
58 model: [""].concat(Wall.folders)
59 delegate: IconBtn {
60 required property string modelData
61 implicitHeight: 26
62 label: modelData === "" ? "all" : modelData
63 active: Settings.wallFolder === modelData
64 onClicked: Settings.wallFolder = modelData
65 }
66 }
67 }
68
69 SectionLabel { text: "wallpaper look"; keywords: "wallpaper style halftone" }
70 Choice {
71 label: "drawn as"
72 keywords: "wallpaper style look"
73 options: [{ value: "dots", label: "mono dots" }, { value: "colour", label: "colour dots" }, { value: "photo", label: "photo" }]
74 value: Settings.wallLook
75 onPicked: v => Settings.wallLook = v
76 }
77 Knob { label: "dot size"; keywords: "pitch grid"; from: 6; to: 24; value: Settings.wallPitch; unit: "px"; onMoved: v => Settings.wallPitch = v }
78 Knob { label: "brightness"; keywords: "wallpaper dim dark"; from: 20; to: 100; value: Settings.wallBright; unit: "%"; onMoved: v => Settings.wallBright = v }
79 Switch { label: "dot grid"; hint: "on the desktop when there is no wallpaper"; checked: Settings.dotGrid; onToggled: on => Settings.dotGrid = on }
80
81 SectionLabel { text: "desktop"; keywords: "home screen" }
82 Switch { label: "24-hour clock"; keywords: "time format 12-hour am pm"; checked: Settings.clock24; onToggled: on => Settings.clock24 = on }
83 Switch { label: "blinking colon"; keywords: "clock blink"; checked: Settings.blink; onToggled: on => Settings.blink = on }
84 Switch { label: "animations"; keywords: "motion transitions reduce"; hint: "panels slide and fade, dots light up in waves"; checked: Settings.motion; onToggled: on => Settings.motion = on }
85 Choice {
86 label: "app icons"
87 keywords: "dock icons"
88 options: [{ value: "dots", label: "dots" }, { value: "mono", label: "mono" }, { value: "colour", label: "colour" }]
89 value: Settings.appIcons
90 onPicked: v => Settings.appIcons = v
91 }
92
93 SectionLabel {
94 text: "colours"
95 keywords: "colors theme scheme accent palette matugen material tonal-spot vibrant expressive fidelity content fruit-salad rainbow neutral monochrome"
96 }
97 Text {
98 Layout.fillWidth: true
99 Layout.leftMargin: 18
100 text: "matugen scheme from the wallpaper, accent = its primary"
101 elide: Text.ElideRight
102 color: Theme.fgDim
103 font.family: Theme.ui
104 font.pixelSize: 14
105 }
106 Flow {
107 Layout.fillWidth: true
108 spacing: 4
109 Repeater {
110 model: ["tonal-spot", "vibrant", "expressive", "fidelity", "content", "fruit-salad", "rainbow", "neutral", "monochrome"]
111 delegate: IconBtn {
112 required property string modelData
113 implicitHeight: 26
114 label: modelData
115 active: Settings.matuScheme === "scheme-" + modelData
116 onClicked: Settings.matuScheme = "scheme-" + modelData
117 }
118 }
119 }
120 Knob { label: "contrast"; keywords: "colours colors"; from: -1; to: 1; decimals: 2; value: Settings.matuContrast; onMoved: v => Settings.matuContrast = v }
121
122 SectionLabel { text: "bar"; keywords: "status bar sizes" }
123 Choice {
124 label: "bar layout"
125 keywords: "vertical horizontal orientation side left top position"
126 options: [{ value: "horizontal", label: "horizontal" }, { value: "vertical", label: "vertical" }]
127 value: Settings.barLayout
128 onPicked: v => Settings.barLayout = v
129 }
130 Choice {
131 label: "bar shape"
132 keywords: "floating pill attached edge strip rounded"
133 options: [{ value: false, label: "attached" }, { value: true, label: "floating pill" }]
134 value: Settings.barFloat
135 onPicked: v => Settings.barFloat = v
136 }
137 Knob { visible: !Theme.barVertical; label: "bar height"; keywords: "top bar size"; from: 32; to: 56; value: Settings.barSize; onMoved: v => Settings.barSize = v }
138 Knob { visible: Theme.barVertical; label: "bar width"; keywords: "vertical side bar size"; from: 48; to: 80; value: Settings.barWidth; onMoved: v => Settings.barWidth = v }
139
140 SectionLabel { text: "transparency"; keywords: "transparent opacity alpha translucent" }
141 Knob { label: "bar opacity"; keywords: "transparent"; from: 0.3; to: 1; decimals: 2; value: Settings.barAlpha; onMoved: v => Settings.barAlpha = v }
142 Knob { label: "panel opacity"; keywords: "transparent control panel"; from: 0.3; to: 1; decimals: 2; value: Settings.panelAlpha; onMoved: v => Settings.panelAlpha = v }
143 }
144}