2 #:import h music_sampler
5 pad_col_sep: 0 if not self.pad_cols else self.parent.pad_x
8 y: (self.parent.top-self.parent.y) - (self.row) * self.parent.key_size - (self.row - 1) * self.parent.key_sep
9 x: (self.col - 1) * self.parent.key_size + int(self.col - 1) * self.parent.key_sep + self.pad_col_sep
19 width: self.key_width * (self.parent.key_size + self.parent.key_sep) - self.parent.key_sep
20 height: self.key_height * (self.parent.key_size + self.parent.key_sep) - self.parent.key_sep
31 rounded_rectangle: self.x + self.line_width, self.y + self.line_width, self.width - 2 * self.line_width, self.height - 2 * self.line_width, 10
32 width: self.line_width
34 rgba: self.line_cross_color
36 points: self.x + self.line_width + 3, self.y + self.line_width + 3, self.x + self.width - 2 * self.line_width - 3, self.y + self.height - 2 * self.line_width - 3
37 width: self.line_width
39 points: self.x + self.line_width + 3, self.y + self.height - 2 * self.line_width - 3, self.x + self.width - 2 * self.line_width - 3, self.y + self.line_width + 3
40 width: self.line_width
45 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size))
47 text: self.parent.key_sym
48 text_size: self.parent.width,self.font_size
52 center_x: self.parent.x + self.texture_size[0] /2 + 5
53 center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5
55 id: key_description_title
57 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2))
59 text: self.parent.description_title
60 text_size: self.parent.width - 2*self.parent.line_width, self.font_size
63 center_x: self.parent.x + self.texture_size[0] /2
64 center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5
68 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2))
70 text: "\n".join(self.parent.description)
71 text_size: 2 * self.parent.width,self.parent.height - key_label.font_size
74 pos: self.parent.x + 2 * self.parent.line_width + 2, self.parent.y
76 size: 2 * self.parent.width - 2 * self.parent.line_width, self.parent.height - key_label.font_size
81 rgba: 229/255, 228/255, 226/255, 1
84 size: self.width, self.height
86 key_size: int( (3 * self.width - 16) / 56)
87 key_sep: int( self.key_size / 24)
88 key_pad_sep: int( self.key_size / 7) + 1
90 border: (self.width - self.key_size * 18 - self.key_sep * 16 - self.key_pad_sep)/ 2
92 mapping_height: self.key_size * 6 + self.key_sep * 5
93 mapping_width: self.key_size * 18 + self.key_sep * 16 + self.key_pad_sep
94 mapping_x: self.border
95 mapping_y: self.top - self.mapping_height - self.border
97 key_list_width: 4 * (mock_ubuntu_regular.width or 0)
98 key_list_height: self.height - self.mapping_height - 3 * self.border
99 key_list_x: (self.action_list_width or 0) + 2 * self.border
100 key_list_y: self.border
102 action_list_height: self.height - self.mapping_height - 3 * self.border
103 action_list_width: 3 * self.width / 4 - self.key_list_width - self.border
104 action_list_x: self.border
105 action_list_y: self.border
107 play_list_height: self.action_list_height
108 play_list_width: self.width - self.action_list_width - 3* self.border
109 play_list_y: self.border
110 play_list_x: self.action_list_width + self.key_list_width + 3 * self.border
112 min_height: min(mock_symbola.height, mock_ubuntu_regular.height, mock_ubuntu_bold.height)
113 symbola_line_height: self.min_height / max(mock_symbola.height,1)
114 ubuntu_regular_line_height: self.min_height / max(mock_ubuntu_regular.height,1)
115 ubuntu_bold_line_height: self.min_height / max(mock_ubuntu_bold.height,1)
119 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
122 text_size: None, None
123 size_hint: None, None
124 size: self.texture_size
126 id: mock_ubuntu_regular
128 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
131 text_size: None, None
132 size_hint: None, None
133 size: self.texture_size
138 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
141 text_size: None, None
142 size_hint: None, None
143 size: self.texture_size
147 pos: self.parent.mapping_x, self.parent.mapping_y
148 size: self.parent.mapping_width, self.parent.mapping_height
150 key_size: self.parent.key_size
151 key_sep: self.parent.key_sep
152 key_pad_sep: self.parent.key_pad_sep
153 pad_x: self.key_size * 15 + 14 * self.key_sep + self.key_pad_sep
156 pos: self.parent.action_list_x, self.parent.action_list_y
157 size: self.parent.action_list_width, self.parent.action_list_height
160 pos: self.parent.key_list_x, self.parent.key_list_y
161 size: self.parent.key_list_width, self.parent.key_list_height
164 pos: self.parent.play_list_x, self.parent.play_list_y
165 size: self.parent.play_list_width, self.parent.play_list_height
168 size_hint: None, None
171 rgba: 250./255, 250./255, 250./255, 1
174 size: self.width, self.height
179 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
181 text: self.parent.first_key
182 text_size: None, None
185 size_hint: None, None
186 size: self.parent.width, self.texture_size[1]
187 pos: 0, self.parent.height - self.height
191 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
193 text: self.parent.second_key
194 text_size: None, None
197 size_hint: None, None
198 size: self.parent.width, self.texture_size[1]
199 pos: 0, self.parent.height - key_list_first.height - self.height
203 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
205 text: self.parent.third_key
206 text_size: None, None
209 size_hint: None, None
210 size: self.parent.width, self.texture_size[1]
211 pos: 0, self.parent.height - key_list_first.height - key_list_second.height - self.height
215 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
217 text: "\n".join(self.parent.keylist[3:])
218 text_size: None, None
221 size_hint: None, None
222 size: self.parent.width, self.texture_size[1]
223 pos: 0, self.parent.height - key_list_first.height - key_list_second.height - key_list_third.height - self.height
226 size_hint: None, None
229 rgba: 250./255, 250./255, 250./255, 1
232 size: self.width, self.height
235 id: action_list_title
238 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
240 text: self.parent.action_title
241 text_size: None, self.parent.height
244 size_hint: None, None
245 size: self.texture_size[0], self.parent.height
247 id: action_list_icons
249 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
250 line_height: self.parent.parent.symbola_line_height or 1
252 text: "\n".join(map(lambda x: x[0], self.parent.action_list))
253 text_size: None, self.parent.height
256 size_hint: None, None
257 size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size
259 id: action_list_names
261 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
262 line_height: self.parent.parent.ubuntu_regular_line_height or 1
264 text: "\n".join(map(lambda x: x[1], self.parent.action_list))
265 text_size: None, self.parent.height
268 size_hint: None, None
270 size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size
273 size_hint: None, None
276 rgba: 250./255, 250./255, 250./255, 1
279 size: self.width, self.height
284 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
285 line_height: self.parent.parent.symbola_line_height or 1
287 text: "\n".join(map(lambda x: x[0], self.parent.playlist))
288 text_size: None, self.parent.height
291 size_hint: None, None
292 size: self.texture_size[0], self.parent.height
295 font_name: "Ubuntu" # FIXME: Mettre en gras quand c'est en cours
296 line_height: self.parent.parent.ubuntu_regular_line_height or 1
297 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
299 text: "\n".join(map(lambda x: x[1], self.parent.playlist))
300 text_size: None, self.parent.height
303 size_hint: None, None
305 size: self.texture_size[0], self.parent.height
309 rgba: 250./255, 250./255, 250./255, 1
312 size: self.width, self.height
315 line_height: self.parent.parent.ubuntu_regular_line_height or 1
316 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
318 text: "\n".join(map(lambda x: x[2], self.parent.playlist))
319 text_size: None, self.parent.height
322 size_hint: None, None
323 pos: self.parent.width - 3 * self.width / 2 - 2 * (self.parent.parent.border or 0), self.y
324 size: self.texture_size[0], self.parent.height
327 size_hint: None, None
334 rgba: 250./255, 250./255, 250./255, 1
337 size: self.width, self.height
339 rgba: self.ready_color
341 pos: self.width - self.key_size / 2, self.height - self.key_size /2
342 size: self.key_size / 3, self.key_size / 3
345 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
347 text: "volume: {}%".format(self.parent.master_volume)
349 size_hint: None, None
350 size: self.texture_size[0], self.texture_size[1]
351 x: self.parent.width - self.width - 2 * self.parent.key_size / 3
352 center_y: self.parent.height - self.height