diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-29 01:04:24 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-29 01:04:24 +0200 |
commit | 4d1dfc89066e8dbccf7e5049686895de6fcb32d2 (patch) | |
tree | c2560a9ac1c15d08e69924e55d93d448768bdec3 /music_sampler/music_sampler.kv | |
parent | 182b6ab1544840ac1827dc95e7f6cd0f1c8d4862 (diff) | |
download | MusicSampler-4d1dfc89066e8dbccf7e5049686895de6fcb32d2.tar.gz MusicSampler-4d1dfc89066e8dbccf7e5049686895de6fcb32d2.tar.zst MusicSampler-4d1dfc89066e8dbccf7e5049686895de6fcb32d2.zip |
Lock widget modifications and reuse labels in actionlist/playlist
Diffstat (limited to 'music_sampler/music_sampler.kv')
-rw-r--r-- | music_sampler/music_sampler.kv | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/music_sampler/music_sampler.kv b/music_sampler/music_sampler.kv index 4a91896..ffc2797 100644 --- a/music_sampler/music_sampler.kv +++ b/music_sampler/music_sampler.kv | |||
@@ -204,6 +204,7 @@ | |||
204 | <ActionList>: | 204 | <ActionList>: |
205 | size_hint: None, None | 205 | size_hint: None, None |
206 | labels_height: self.parent.max_height or 1 | 206 | labels_height: self.parent.max_height or 1 |
207 | font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10)) | ||
207 | canvas: | 208 | canvas: |
208 | Color: | 209 | Color: |
209 | rgba: 250./255, 250./255, 250./255, 1 | 210 | rgba: 250./255, 250./255, 250./255, 1 |
@@ -214,7 +215,7 @@ | |||
214 | id: action_list_title | 215 | id: action_list_title |
215 | font_name: "Ubuntu" | 216 | font_name: "Ubuntu" |
216 | bold: True | 217 | bold: True |
217 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) | 218 | font_size: self.parent.font_size |
218 | color: 0, 0, 0, 1 | 219 | color: 0, 0, 0, 1 |
219 | text: self.parent.action_title | 220 | text: self.parent.action_title |
220 | text_size: None, self.parent.height | 221 | text_size: None, self.parent.height |
@@ -223,15 +224,21 @@ | |||
223 | size_hint: None, None | 224 | size_hint: None, None |
224 | size: self.texture_size[0], self.parent.height | 225 | size: self.texture_size[0], self.parent.height |
225 | ActionListIcons: | 226 | ActionListIcons: |
227 | font_size: self.parent.font_size | ||
228 | labels_height: self.parent.labels_height | ||
226 | orientation: 'lr-tb' | 229 | orientation: 'lr-tb' |
227 | size_hint: 0.02, 0.9 | 230 | size_hint: 0.02, 0.9 |
228 | pos_hint: { 'x': 0, 'top': 0.9 } | 231 | pos_hint: { 'x': 0, 'top': 0.9 } |
229 | ActionListDescriptions: | 232 | ActionListDescriptions: |
233 | font_size: self.parent.font_size | ||
234 | labels_height: self.parent.labels_height | ||
230 | orientation: 'lr-tb' | 235 | orientation: 'lr-tb' |
231 | size_hint: 0.98, 0.9 | 236 | size_hint: 0.98, 0.9 |
232 | pos_hint: { 'x': 0.02, 'top': 0.9 } | 237 | pos_hint: { 'x': 0.02, 'top': 0.9 } |
233 | 238 | ||
234 | <ActionListIcon>: | 239 | <ActionListIcon>: |
240 | font_size: self.parent and self.parent.font_size or 10 | ||
241 | height: self.parent and self.parent.labels_height or 0 | ||
235 | font_name: "Symbola" | 242 | font_name: "Symbola" |
236 | color: 0, 0, 0, 1 | 243 | color: 0, 0, 0, 1 |
237 | text_size: None, None | 244 | text_size: None, None |
@@ -240,6 +247,8 @@ | |||
240 | width: self.texture_size[0] | 247 | width: self.texture_size[0] |
241 | 248 | ||
242 | <ActionListDescription>: | 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 | ||
243 | font_name: "Ubuntu" | 252 | font_name: "Ubuntu" |
244 | color: 0, 0, 0, 1 | 253 | color: 0, 0, 0, 1 |
245 | text_size: self.width, None | 254 | text_size: self.width, None |
@@ -252,6 +261,7 @@ | |||
252 | <PlayList>: | 261 | <PlayList>: |
253 | size_hint: None, None | 262 | size_hint: None, None |
254 | labels_height: self.parent.max_height or 1 | 263 | labels_height: self.parent.max_height or 1 |
264 | font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10)) | ||
255 | canvas: | 265 | canvas: |
256 | Color: | 266 | Color: |
257 | rgba: 250./255, 250./255, 250./255, 1 | 267 | rgba: 250./255, 250./255, 250./255, 1 |
@@ -259,19 +269,27 @@ | |||
259 | pos: 0, 0 | 269 | pos: 0, 0 |
260 | size: self.width, self.height | 270 | size: self.width, self.height |
261 | PlayListIcons: | 271 | PlayListIcons: |
272 | font_size: self.parent.font_size | ||
273 | labels_height: self.parent.labels_height | ||
262 | orientation: 'lr-tb' | 274 | orientation: 'lr-tb' |
263 | size_hint: 0.05, 1 | 275 | size_hint: 0.05, 1 |
264 | pos_hints: { 'x': 0, 'top': 0 } | 276 | pos_hints: { 'x': 0, 'top': 0 } |
265 | PlayListNames: | 277 | PlayListNames: |
278 | font_size: self.parent.font_size | ||
279 | labels_height: self.parent.labels_height | ||
266 | orientation: 'lr-tb' | 280 | orientation: 'lr-tb' |
267 | pos_hint: { 'x': 0.05, 'bottom': 0 } | 281 | pos_hint: { 'x': 0.05, 'bottom': 0 } |
268 | size_hint: 0.65, 1 | 282 | size_hint: 0.65, 1 |
269 | PlayListTimes: | 283 | PlayListTimes: |
284 | font_size: self.parent.font_size | ||
285 | labels_height: self.parent.labels_height | ||
270 | orientation: 'lr-tb' | 286 | orientation: 'lr-tb' |
271 | pos_hint: { 'x': 0.7, 'bottom': 0 } | 287 | pos_hint: { 'x': 0.7, 'bottom': 0 } |
272 | size_hint: 0.30, 1 | 288 | size_hint: 0.30, 1 |
273 | 289 | ||
274 | <PlayListIcon>: | 290 | <PlayListIcon>: |
291 | font_size: self.parent and self.parent.font_size or 10 | ||
292 | height: self.parent and self.parent.labels_height or 0 | ||
275 | font_name: "Symbola" | 293 | font_name: "Symbola" |
276 | color: 0, 0, 0, 1 | 294 | color: 0, 0, 0, 1 |
277 | text_size: None, None | 295 | text_size: None, None |
@@ -280,6 +298,8 @@ | |||
280 | width: self.texture_size[0] | 298 | width: self.texture_size[0] |
281 | 299 | ||
282 | <PlayListName>: | 300 | <PlayListName>: |
301 | font_size: self.parent and self.parent.font_size or 10 | ||
302 | height: self.parent and self.parent.labels_height or 0 | ||
283 | font_name: "Ubuntu" | 303 | font_name: "Ubuntu" |
284 | color: 0, 0, 0, 1 | 304 | color: 0, 0, 0, 1 |
285 | text_size: self.width, None | 305 | text_size: self.width, None |
@@ -290,6 +310,8 @@ | |||
290 | size_hint: 1, None | 310 | size_hint: 1, None |
291 | 311 | ||
292 | <PlayListTime>: | 312 | <PlayListTime>: |
313 | font_size: self.parent and self.parent.font_size or 10 | ||
314 | height: self.parent and self.parent.labels_height or 0 | ||
293 | canvas.before: | 315 | canvas.before: |
294 | Color: | 316 | Color: |
295 | rgba: 250./255, 250./255, 250./255, 1 | 317 | rgba: 250./255, 250./255, 250./255, 1 |