diff options
Diffstat (limited to 'musicsampler.kv')
-rw-r--r-- | musicsampler.kv | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/musicsampler.kv b/musicsampler.kv index 17be1f5..3bf344e 100644 --- a/musicsampler.kv +++ b/musicsampler.kv | |||
@@ -1,4 +1,5 @@ | |||
1 | #:import math math | 1 | #:import math math |
2 | #:import h helpers | ||
2 | 3 | ||
3 | <Key>: | 4 | <Key>: |
4 | pad_col_sep: 0 if not self.pad_cols else self.parent.pad_x | 5 | pad_col_sep: 0 if not self.pad_cols else self.parent.pad_x |
@@ -32,7 +33,7 @@ | |||
32 | width: self.line_width | 33 | width: self.line_width |
33 | Label: | 34 | Label: |
34 | id: key_label | 35 | id: key_label |
35 | font_name: "fonts/Ubuntu-B.ttf" | 36 | font_name: h.path() + "fonts/Ubuntu-B.ttf" |
36 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size)) | 37 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size)) |
37 | color: 0, 0, 0, 1 | 38 | color: 0, 0, 0, 1 |
38 | text: self.parent.key_sym | 39 | text: self.parent.key_sym |
@@ -44,7 +45,7 @@ | |||
44 | center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5 | 45 | center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5 |
45 | Label: | 46 | Label: |
46 | id: key_description_title | 47 | id: key_description_title |
47 | font_name: "fonts/Ubuntu-Regular.ttf" | 48 | font_name: h.path() + "fonts/Ubuntu-Regular.ttf" |
48 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2)) | 49 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2)) |
49 | color: 0, 0, 0, 1 | 50 | color: 0, 0, 0, 1 |
50 | text: self.parent.description_title | 51 | text: self.parent.description_title |
@@ -55,7 +56,7 @@ | |||
55 | center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5 | 56 | center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5 |
56 | Label: | 57 | Label: |
57 | id: key_description | 58 | id: key_description |
58 | font_name: "fonts/Ubuntu-Regular.ttf" | 59 | font_name: h.path() + "fonts/Ubuntu-Regular.ttf" |
59 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2)) | 60 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2)) |
60 | color: 0, 0, 0, 1 | 61 | color: 0, 0, 0, 1 |
61 | text: "\n".join(self.parent.description) | 62 | text: "\n".join(self.parent.description) |
@@ -121,7 +122,7 @@ | |||
121 | size: self.width, self.height | 122 | size: self.width, self.height |
122 | Label: | 123 | Label: |
123 | id: action_list_title | 124 | id: action_list_title |
124 | font_name: "fonts/Ubuntu-B.ttf" | 125 | font_name: h.path() + "fonts/Ubuntu-B.ttf" |
125 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) | 126 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) |
126 | color: 0, 0, 0, 1 | 127 | color: 0, 0, 0, 1 |
127 | text: self.parent.action_title | 128 | text: self.parent.action_title |
@@ -132,7 +133,7 @@ | |||
132 | size: self.texture_size[0], self.parent.height | 133 | size: self.texture_size[0], self.parent.height |
133 | Label: | 134 | Label: |
134 | id: action_list_icons | 135 | id: action_list_icons |
135 | font_name: "fonts/Symbola.ttf" | 136 | font_name: h.path() + "fonts/Symbola.ttf" |
136 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) | 137 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) |
137 | line_height: 1.2 # FIXME: Donner la bonne taille de label | 138 | line_height: 1.2 # FIXME: Donner la bonne taille de label |
138 | color: 0, 0, 0, 1 | 139 | color: 0, 0, 0, 1 |
@@ -144,7 +145,7 @@ | |||
144 | size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size | 145 | size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size |
145 | Label: | 146 | Label: |
146 | id: action_list_names | 147 | id: action_list_names |
147 | font_name: "fonts/Ubuntu-Regular.ttf" | 148 | font_name: h.path() + "fonts/Ubuntu-Regular.ttf" |
148 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) | 149 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) |
149 | color: 0, 0, 0, 1 | 150 | color: 0, 0, 0, 1 |
150 | text: "\n".join(map(lambda x: x[1], self.parent.action_list)) | 151 | text: "\n".join(map(lambda x: x[1], self.parent.action_list)) |
@@ -165,7 +166,7 @@ | |||
165 | size: self.width, self.height | 166 | size: self.width, self.height |
166 | Label: | 167 | Label: |
167 | id: playlist_icons | 168 | id: playlist_icons |
168 | font_name: "fonts/Symbola.ttf" | 169 | font_name: h.path() + "fonts/Symbola.ttf" |
169 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) | 170 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) |
170 | line_height: 1.2 # FIXME: Donner la bonne taille de label | 171 | line_height: 1.2 # FIXME: Donner la bonne taille de label |
171 | color: 0, 0, 0, 1 | 172 | color: 0, 0, 0, 1 |
@@ -177,7 +178,7 @@ | |||
177 | size: self.texture_size[0], self.parent.height | 178 | size: self.texture_size[0], self.parent.height |
178 | Label: | 179 | Label: |
179 | id: playlist_names | 180 | id: playlist_names |
180 | font_name: "fonts/Ubuntu-Regular.ttf" # FIXME: Mettre en gras quand c'est en cours | 181 | font_name: h.path() + "fonts/Ubuntu-Regular.ttf" # FIXME: Mettre en gras quand c'est en cours |
181 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) | 182 | font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) |
182 | color: 0, 0, 0, 1 | 183 | color: 0, 0, 0, 1 |
183 | text: "\n".join(map(lambda x: x[1], self.parent.playlist)) | 184 | text: "\n".join(map(lambda x: x[1], self.parent.playlist)) |