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.key_list_width - self.action_list_width - 4* self.border
109 play_list_y: self.border
110 play_list_x: self.action_list_width + self.key_list_width + 3 * self.border
112 max_height: 1.3 * math.ceil(2 * math.sqrt(self.key_size or 10))
115 id: mock_ubuntu_regular
117 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
120 text_size: None, None
121 size_hint: None, None
122 size: self.texture_size
126 pos: self.parent.mapping_x, self.parent.mapping_y
127 size: self.parent.mapping_width, self.parent.mapping_height
129 key_size: self.parent.key_size
130 key_sep: self.parent.key_sep
131 key_pad_sep: self.parent.key_pad_sep
132 pad_x: self.key_size * 15 + 14 * self.key_sep + self.key_pad_sep
135 pos: self.parent.action_list_x, self.parent.action_list_y
136 size: self.parent.action_list_width, self.parent.action_list_height
139 pos: self.parent.key_list_x, self.parent.key_list_y
140 size: self.parent.key_list_width, self.parent.key_list_height
143 pos: self.parent.play_list_x, self.parent.play_list_y
144 size: self.parent.play_list_width, self.parent.play_list_height
147 size_hint: None, None
150 rgba: 250./255, 250./255, 250./255, 1
153 size: self.width, self.height
158 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
160 text: self.parent.first_key
161 text_size: None, None
164 size_hint: None, None
165 size: self.parent.width, self.texture_size[1]
166 pos: 0, self.parent.height - self.height
170 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
172 text: self.parent.second_key
173 text_size: None, None
176 size_hint: None, None
177 size: self.parent.width, self.texture_size[1]
178 pos: 0, self.parent.height - key_list_first.height - self.height
182 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
184 text: self.parent.third_key
185 text_size: None, None
188 size_hint: None, None
189 size: self.parent.width, self.texture_size[1]
190 pos: 0, self.parent.height - key_list_first.height - key_list_second.height - self.height
194 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
196 text: "\n".join(self.parent.keylist[3:])
197 text_size: None, None
200 size_hint: None, None
201 size: self.parent.width, self.texture_size[1]
202 pos: 0, self.parent.height - key_list_first.height - key_list_second.height - key_list_third.height - self.height
205 size_hint: None, None
206 labels_height: self.parent.max_height or 1
207 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
210 rgba: 250./255, 250./255, 250./255, 1
213 size: self.width, self.height
215 id: action_list_title
218 font_size: self.parent.font_size
220 text: self.parent.action_title
221 text_size: None, self.parent.height
224 size_hint: None, None
225 size: self.texture_size[0], self.parent.height
227 font_size: self.parent.font_size
228 labels_height: self.parent.labels_height
231 pos_hint: { 'x': 0, 'top': 0.9 }
232 ActionListDescriptions:
233 font_size: self.parent.font_size
234 labels_height: self.parent.labels_height
237 pos_hint: { 'x': 0.02, 'top': 0.9 }
240 font_size: self.parent and self.parent.font_size or 10
241 height: self.parent and self.parent.labels_height or 0
244 text_size: None, None
246 size_hint: None, None
247 width: self.texture_size[0]
249 <ActionListDescription>:
250 font_size: self.parent and self.parent.font_size or 10
251 height: self.parent and self.parent.labels_height or 0
254 text_size: self.width, None
256 shorten_from: "right"
262 size_hint: None, None
263 labels_height: self.parent.max_height or 1
264 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
267 rgba: 250./255, 250./255, 250./255, 1
270 size: self.width, self.height
272 font_size: self.parent.font_size
273 labels_height: self.parent.labels_height
276 pos_hints: { 'x': 0, 'top': 0 }
278 font_size: self.parent.font_size
279 labels_height: self.parent.labels_height
281 pos_hint: { 'x': 0.05, 'bottom': 0 }
284 font_size: self.parent.font_size
285 labels_height: self.parent.labels_height
287 pos_hint: { 'x': 0.7, 'bottom': 0 }
291 font_size: self.parent and self.parent.font_size or 10
292 height: self.parent and self.parent.labels_height or 0
295 text_size: None, None
297 size_hint: None, None
298 width: self.texture_size[0]
301 font_size: self.parent and self.parent.font_size or 10
302 height: self.parent and self.parent.labels_height or 0
305 text_size: self.width, None
307 shorten_from: "right"
313 font_size: self.parent and self.parent.font_size or 10
314 height: self.parent and self.parent.labels_height or 0
317 rgba: 250./255, 250./255, 250./255, 1
320 size: self.width, self.height
323 text_size: None, None
325 size_hint: None, None
326 width: self.texture_size[0]
329 size_hint: None, None
336 rgba: 250./255, 250./255, 250./255, 1
339 size: self.width, self.height
341 rgba: self.ready_color
343 pos: self.width - self.key_size / 2, self.height - self.key_size /2
344 size: self.key_size / 3, self.key_size / 3
347 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
349 text: "volume: {}%".format(self.parent.master_volume)
351 size_hint: None, None
352 size: self.texture_size[0], self.texture_size[1]
353 x: self.parent.width - self.width - 2 * self.parent.key_size / 3
354 center_y: self.parent.height - self.height