-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_window.kv
265 lines (211 loc) · 5.23 KB
/
main_window.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
## zorn.kv
#:import colours magic_palette_colorkit_fractional
## This forces Spinner Value strings to wrap text in the dropdown,
## gives it a bit of left margin, and centers it vertically.
## It's pulled into all ColourXXSpinner widgets using the
## option_cls property.
<MySpinnerOption@SpinnerOption>:
text_size: self.width - 10, None
size_hint: self.height, None
height: 70
<ColourChip>:
text: ""
text_size: self.size
size_hint: None, None
halign: "center"
width: 100
height: 100
dynamic_colour: [0.952941176, 0.956862745, 0.968627451, 1.0] ## Titanium White
canvas.before:
Color:
rgba: self.dynamic_colour
Rectangle:
pos: self.pos
size: self.size
<ZornGridLayout>:
rows: 7
cols: 6
##################### ROW 1 ##################
BoxLayout: ## COLUMN 4
orientation: 'vertical'
size_hint: None, None
width: 100
height: 100
NewButton:
id: new_button
text: "New"
size_hint: None, None
width: 100
height: 50
on_release: root.on_new_button_pressed()
LoadButton:
id: load_button
text: "Load"
size_hint: None, None
width: 100
height: 50
on_release: root.on_load_button_pressed()
BoxLayout: ## COLUMN 5
orientation: 'vertical'
size_hint: None, None
width: 100
height: 100
SaveButton:
id: save_button
text: "Save"
size_hint: None, None
width: 100
height: 50
on_release: root.on_save_button_pressed()
SaveAsButton:
id: save_as_button
text: "Save As..."
size_hint: None, None
width: 100
height: 50
on_release: root.on_save_as_button_pressed()
Mix01Spinner: ## COLUMN 2
id: mix_01_spinner
text: "Titanium White"
text_size: self.width, None ## forces text to wrap on the Spinner header
values: reversed(colours.ColourLookUp)
option_cls: "MySpinnerOption" ## see <MySpinnerOption> at top of file
size_hint: None, None
size: 100, 100
pos_hint: {'left': 1, 'top': 1}
on_text:
self.set_spinner_chip(self.text, mix_01)
root.calculate_colours()
Mix02Spinner: ## COLUMN 2
id: mix_02_spinner
text: "Titanium White"
text_size: self.width, None ## forces text to wrap on the Spinner header
values: reversed(colours.ColourLookUp)
option_cls: "MySpinnerOption" ## see <MySpinnerOption> at top of file
size_hint: None, None
size: 100, 100
pos_hint: {'left': 1, 'top': 1}
on_text:
self.set_spinner_chip(self.text, mix_02)
root.calculate_colours()
Colour01Spinner: ## COLUMN 3
id: colour_01_spinner
text: "Titanium White"
text_size: self.width, None ## forces text to wrap on the Spinner header
values: colours.ColourLookUp
option_cls: "MySpinnerOption" ## see <MySpinnerOption> at top of file
size_hint: None, None
size: 100, 100
pos_hint: {'x': 0, 'top': 1}
on_text:
self.set_spinner_chip(self.text, colour_01)
root.calculate_colours()
Colour02Spinner: ## COLUMN 7
id: colour_02_spinner
text: "Titanium White"
text_size: self.width, None ## forces text to wrap on the Spinner header
values: colours.ColourLookUp
option_cls: "MySpinnerOption" ## see <MySpinnerOption> at top of file
size_hint: None, None
size: 100, 100
pos_hint: {'right': 1, 'top': 1}
on_text:
self.set_spinner_chip(self.text, colour_02)
root.calculate_colours()
##################### ROW 2 ##################
BoxLayout: ## COLUMN 6
orientation: 'vertical'
size_hint: None, None
width: 100
height: 100
ReloadButton:
id: reload_button
text: "Reload"
size_hint: None, None
width: 100
height: 50
on_release: root.on_reload_button_pressed()
QuitButton:
id: quit_button
text: "Quit"
size_hint: None, None
width: 100
height: 50
on_release:
self.clean_up()
app.exit_check()
ColourChip: ## COLUMN 3
id: colour_01
ColourChip: ## COLUMN 4
id: chip_01
ColourChip: ## COLUMN 5
id: chip_02
ColourChip: ## COLUMN 6
id: chip_03
ColourChip: ## COLUMN 7
id: colour_02
##################### ROW 3 ##################
ColourChip: ## COLUMN 2
id: mix_01
ColourChip: ## COLUMN 3
id: chip_04
ColourChip: ## COLUMN 4
id: chip_05
ColourChip: ## COLUMN 5
id: chip_06
ColourChip: ## COLUMN 6
id: chip_07
ColourChip: ## COLUMN 7
id: chip_08
##################### ROW 4 ##################
ColourChip: ## COLUMN 2
id: chip_09
ColourChip: ## COLUMN 3
id: chip_10
ColourChip: ## COLUMN 4
id: chip_11
ColourChip: ## COLUMN 5
id: chip_12
ColourChip: ## COLUMN 6
id: chip_13
ColourChip: ## COLUMN 7
id: chip_14
##################### ROW 5 ##################
ColourChip: ## COLUMN 2
id: chip_15
ColourChip: ## COLUMN 3
id: chip_16
ColourChip: ## COLUMN 4
id: chip_17
ColourChip: ## COLUMN 5
id: chip_18
ColourChip: ## COLUMN 6
id: chip_19
ColourChip: ## COLUMN 7
id: chip_20
##################### ROW 6 ##################
ColourChip: ## COLUMN 2
id: chip_21
ColourChip: ## COLUMN 3
id: chip_22
ColourChip: ## COLUMN 4
id: chip_23
ColourChip: ## COLUMN 5
id: chip_24
ColourChip: ## COLUMN 6
id: chip_25
ColourChip: ## COLUMN 7
id: chip_26
##################### ROW 7 ##################
ColourChip: ## COLUMN 2
id: mix_02
ColourChip: ## COLUMN 3
id: chip_27
ColourChip: ## COLUMN 4
id: chip_28
ColourChip: ## COLUMN 5
id: chip_29
ColourChip: ## COLUMN 6
id: chip_30
ColourChip: ## COLUMN 7
id: chip_31