@@ -7,160 +7,155 @@ import qs.components.containers
77import qs.services
88import qs.config
99
10- Loader {
11- asynchronous: true
12- active: Config .background .enabled
10+ Variants {
11+ model: Config .background .enabled ? Screens .screens : []
1312
14- sourceComponent : Variants {
15- model : Screens . screens
13+ StyledWindow {
14+ id : win
1615
17- StyledWindow {
18- id: win
16+ required property ShellScreen modelData
1917
20- required property ShellScreen modelData
18+ screen : modelData
19+ name: " background"
20+ WlrLayershell .exclusionMode : ExclusionMode .Ignore
21+ WlrLayershell .layer : Config .background .wallpaperEnabled ? WlrLayer .Background : WlrLayer .Bottom
22+ color: Config .background .wallpaperEnabled ? " black" : " transparent"
23+ surfaceFormat .opaque : false
2124
22- screen : modelData
23- name: " background"
24- WlrLayershell .exclusionMode : ExclusionMode .Ignore
25- WlrLayershell .layer : Config .background .wallpaperEnabled ? WlrLayer .Background : WlrLayer .Bottom
26- color: Config .background .wallpaperEnabled ? " black" : " transparent"
27- surfaceFormat .opaque : false
25+ anchors .top : true
26+ anchors .bottom : true
27+ anchors .left : true
28+ anchors .right : true
2829
29- anchors .top : true
30- anchors .bottom : true
31- anchors .left : true
32- anchors .right : true
30+ Item {
31+ id: behindClock
3332
34- Item {
35- id: behindClock
33+ anchors .fill : parent
34+
35+ Loader {
36+ id: wallpaper
37+
38+ asynchronous: true
3639
3740 anchors .fill : parent
41+ active: Config .background .wallpaperEnabled
3842
39- Loader {
40- id : wallpaper
43+ sourceComponent : Wallpaper {}
44+ }
4145
42- asynchronous: true
46+ Visualiser {
47+ anchors .fill : parent
48+ screen : win .modelData
49+ wallpaper: wallpaper
50+ }
51+ }
4352
44- anchors . fill : parent
45- active : Config . background . wallpaperEnabled
53+ Loader {
54+ id : clockLoader
4655
47- sourceComponent : Wallpaper {}
48- }
56+ asynchronous : true
57+ active : Config . background . desktopClock . enabled
4958
50- Visualiser {
51- anchors .fill : parent
52- screen : win .modelData
53- wallpaper: wallpaper
54- }
55- }
59+ anchors .margins : Appearance .padding .large * 2
60+ anchors .leftMargin : Appearance .padding .large * 2 + Config .bar .sizes .innerWidth + Math .max (Appearance .padding .smaller , Config .border .thickness )
5661
57- Loader {
58- id: clockLoader
62+ state: Config .background .desktopClock .position
63+ states: [
64+ State {
65+ name: " top-left"
5966
60- asynchronous: true
61- active: Config .background .desktopClock .enabled
62-
63- anchors .margins : Appearance .padding .large * 2
64- anchors .leftMargin : Appearance .padding .large * 2 + Config .bar .sizes .innerWidth + Math .max (Appearance .padding .smaller , Config .border .thickness )
65-
66- state: Config .background .desktopClock .position
67- states: [
68- State {
69- name: " top-left"
70-
71- AnchorChanges {
72- target: clockLoader
73- anchors .top : parent .top
74- anchors .left : parent .left
75- }
76- },
77- State {
78- name: " top-center"
79-
80- AnchorChanges {
81- target: clockLoader
82- anchors .top : parent .top
83- anchors .horizontalCenter : parent .horizontalCenter
84- }
85- },
86- State {
87- name: " top-right"
88-
89- AnchorChanges {
90- target: clockLoader
91- anchors .top : parent .top
92- anchors .right : parent .right
93- }
94- },
95- State {
96- name: " middle-left"
97-
98- AnchorChanges {
99- target: clockLoader
100- anchors .verticalCenter : parent .verticalCenter
101- anchors .left : parent .left
102- }
103- },
104- State {
105- name: " middle-center"
106-
107- AnchorChanges {
108- target: clockLoader
109- anchors .verticalCenter : parent .verticalCenter
110- anchors .horizontalCenter : parent .horizontalCenter
111- }
112- },
113- State {
114- name: " middle-right"
115-
116- AnchorChanges {
117- target: clockLoader
118- anchors .verticalCenter : parent .verticalCenter
119- anchors .right : parent .right
120- }
121- },
122- State {
123- name: " bottom-left"
124-
125- AnchorChanges {
126- target: clockLoader
127- anchors .bottom : parent .bottom
128- anchors .left : parent .left
129- }
130- },
131- State {
132- name: " bottom-center"
133-
134- AnchorChanges {
135- target: clockLoader
136- anchors .bottom : parent .bottom
137- anchors .horizontalCenter : parent .horizontalCenter
138- }
139- },
140- State {
141- name: " bottom-right"
142-
143- AnchorChanges {
144- target: clockLoader
145- anchors .bottom : parent .bottom
146- anchors .right : parent .right
147- }
67+ AnchorChanges {
68+ target: clockLoader
69+ anchors .top : parent .top
70+ anchors .left : parent .left
14871 }
149- ]
150-
151- transitions: Transition {
152- AnchorAnimation {
153- duration: Appearance .anim .durations .expressiveDefaultSpatial
154- easing .bezierCurve : Appearance .anim .curves .expressiveDefaultSpatial
72+ },
73+ State {
74+ name: " top-center"
75+
76+ AnchorChanges {
77+ target: clockLoader
78+ anchors .top : parent .top
79+ anchors .horizontalCenter : parent .horizontalCenter
80+ }
81+ },
82+ State {
83+ name: " top-right"
84+
85+ AnchorChanges {
86+ target: clockLoader
87+ anchors .top : parent .top
88+ anchors .right : parent .right
89+ }
90+ },
91+ State {
92+ name: " middle-left"
93+
94+ AnchorChanges {
95+ target: clockLoader
96+ anchors .verticalCenter : parent .verticalCenter
97+ anchors .left : parent .left
98+ }
99+ },
100+ State {
101+ name: " middle-center"
102+
103+ AnchorChanges {
104+ target: clockLoader
105+ anchors .verticalCenter : parent .verticalCenter
106+ anchors .horizontalCenter : parent .horizontalCenter
107+ }
108+ },
109+ State {
110+ name: " middle-right"
111+
112+ AnchorChanges {
113+ target: clockLoader
114+ anchors .verticalCenter : parent .verticalCenter
115+ anchors .right : parent .right
116+ }
117+ },
118+ State {
119+ name: " bottom-left"
120+
121+ AnchorChanges {
122+ target: clockLoader
123+ anchors .bottom : parent .bottom
124+ anchors .left : parent .left
125+ }
126+ },
127+ State {
128+ name: " bottom-center"
129+
130+ AnchorChanges {
131+ target: clockLoader
132+ anchors .bottom : parent .bottom
133+ anchors .horizontalCenter : parent .horizontalCenter
134+ }
135+ },
136+ State {
137+ name: " bottom-right"
138+
139+ AnchorChanges {
140+ target: clockLoader
141+ anchors .bottom : parent .bottom
142+ anchors .right : parent .right
155143 }
156144 }
145+ ]
157146
158- sourceComponent : DesktopClock {
159- wallpaper : behindClock
160- absX : clockLoader . x
161- absY : clockLoader . y
147+ transitions : Transition {
148+ AnchorAnimation {
149+ duration : Appearance . anim . durations . expressiveDefaultSpatial
150+ easing . bezierCurve : Appearance . anim . curves . expressiveDefaultSpatial
162151 }
163152 }
153+
154+ sourceComponent: DesktopClock {
155+ wallpaper: behindClock
156+ absX: clockLoader .x
157+ absY: clockLoader .y
158+ }
164159 }
165160 }
166161}
0 commit comments