@@ -4,25 +4,62 @@ import Caelestia.Config
44import qs.components
55import qs.services
66
7- RowLayout {
7+ Item {
88 id: root
99
1010 required property var lock
11+ required property bool isPortrait
12+ required property real lockHeight
1113
12- spacing: Tokens .spacing .largeIncreased * 2
13-
14+ // Portrait layout
1415 ColumnLayout {
15- Layout .fillWidth : true
16+ anchors .fill : parent
17+ visible: root .isPortrait
1618 spacing: Tokens .spacing .medium
1719
18- WeatherInfo {
20+ RowLayout {
1921 Layout .fillWidth : true
20- rootHeight: root .height
22+ spacing: Tokens .spacing .largeIncreased * 2
23+
24+ WeatherInfo {
25+ Layout .fillWidth : true
26+ rootHeight: root .height / Tokens .sizes .lock .ratio
27+ }
28+
29+ Resources {
30+ Layout .fillWidth : true
31+ }
2132 }
2233
23- Fetch {
34+ Center {
35+ Layout .alignment : Qt .AlignHCenter
36+ lock: root .lock
37+ isPortrait: root .isPortrait
38+ lockHeight: root .lockHeight
39+ }
40+
41+ RowLayout {
2442 Layout .fillWidth : true
25- rootHeight: root .height
43+
44+ spacing: Tokens .spacing .largeIncreased * 2
45+
46+ Fetch {
47+ Layout .fillWidth : true
48+ rootHeight: root .height
49+ }
50+
51+ StyledRect {
52+ Layout .fillWidth : true
53+ Layout .fillHeight : true
54+
55+ bottomRightRadius: Tokens .rounding .extraLarge
56+ radius: Tokens .rounding .medium
57+ color: Colours .tPalette .m3surfaceContainer
58+
59+ NotifDock {
60+ lock: root .lock
61+ }
62+ }
2663 }
2764
2865 Media {
@@ -32,28 +69,59 @@ RowLayout {
3269 }
3370 }
3471
35- Center {
36- lock: root .lock
37- }
72+ // Landscape layout
73+ RowLayout {
74+ anchors .fill : parent
75+ visible: ! root .isPortrait
76+ spacing: Tokens .spacing .largeIncreased * 2
3877
39- ColumnLayout {
40- Layout .fillWidth : true
41- spacing: Tokens .spacing .medium
42-
43- Resources {
78+ ColumnLayout {
4479 Layout .fillWidth : true
80+ spacing: Tokens .spacing .medium
81+
82+ WeatherInfo {
83+ Layout .fillWidth : true
84+ rootHeight: root .height
85+ }
86+
87+ Fetch {
88+ Layout .fillWidth : true
89+ rootHeight: root .height
90+ }
91+
92+ Media {
93+ Layout .fillWidth : true
94+ Layout .fillHeight : true
95+
96+ lock: root .lock
97+ }
4598 }
4699
47- StyledRect {
100+ Center {
101+ lock: root .lock
102+ isPortrait: root .isPortrait
103+ lockHeight: root .lockHeight
104+ }
105+
106+ ColumnLayout {
48107 Layout .fillWidth : true
49- Layout . fillHeight : true
108+ spacing : Tokens . spacing . medium
50109
51- bottomRightRadius : Tokens . rounding . extraLarge
52- radius : Tokens . rounding . medium
53- color : Colours . tPalette . m3surfaceContainer
110+ Resources {
111+ Layout . fillWidth : true
112+ }
54113
55- NotifDock {
56- lock: root .lock
114+ StyledRect {
115+ Layout .fillWidth : true
116+ Layout .fillHeight : true
117+
118+ bottomRightRadius: Tokens .rounding .extraLarge
119+ radius: Tokens .rounding .medium
120+ color: Colours .tPalette .m3surfaceContainer
121+
122+ NotifDock {
123+ lock: root .lock
124+ }
57125 }
58126 }
59127 }
0 commit comments