aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--musicsampler.kv99
1 files changed, 36 insertions, 63 deletions
diff --git a/musicsampler.kv b/musicsampler.kv
index 137b7bd..4a44069 100644
--- a/musicsampler.kv
+++ b/musicsampler.kv
@@ -94,6 +94,38 @@
94 play_list_y: self.border 94 play_list_y: self.border
95 play_list_x: self.action_list_width + 2 * self.border 95 play_list_x: self.action_list_width + 2 * self.border
96 96
97 min_height: min(mock_symbola.height, mock_ubuntu_regular.height, mock_ubuntu_bold.height)
98 symbola_line_height: self.min_height / max(mock_symbola.height,1)
99 ubuntu_regular_line_height: self.min_height / max(mock_ubuntu_regular.height,1)
100 ubuntu_bold_line_height: self.min_height / max(mock_ubuntu_bold.height,1)
101 Label:
102 id: mock_symbola
103 font_name: h.path() + "fonts/Symbola.ttf"
104 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
105 color: 0, 0, 0, 0
106 text: "A"
107 text_size: None, None
108 size_hint: None, None
109 size: self.texture_size
110 Label:
111 id: mock_ubuntu_regular
112 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
113 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
114 color: 0, 0, 0, 0
115 text: "A"
116 text_size: None, None
117 size_hint: None, None
118 size: self.texture_size
119 Label:
120 id: mock_ubuntu_bold
121 font_name: h.path() + "fonts/Ubuntu-B.ttf"
122 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
123 color: 0, 0, 0, 0
124 text: "A"
125 text_size: None, None
126 size_hint: None, None
127 size: self.texture_size
128
97 Mapping: 129 Mapping:
98 id: Mapping 130 id: Mapping
99 pos: self.parent.mapping_x, self.parent.mapping_y 131 pos: self.parent.mapping_x, self.parent.mapping_y
@@ -113,7 +145,6 @@
113 size: self.parent.play_list_width, self.parent.play_list_height 145 size: self.parent.play_list_width, self.parent.play_list_height
114 146
115<ActionList>: 147<ActionList>:
116 min_height: min(action_list_mock_symbola.height, action_list_mock_ubuntu_regular.height, action_list_mock_ubuntu_bold.height)
117 size_hint: None, None 148 size_hint: None, None
118 canvas: 149 canvas:
119 Color: 150 Color:
@@ -121,35 +152,6 @@
121 Rectangle: 152 Rectangle:
122 pos: 0, 0 153 pos: 0, 0
123 size: self.width, self.height 154 size: self.width, self.height
124 # FIXME: déplacer ça dans Screen?
125 Label:
126 id: action_list_mock_symbola
127 font_name: h.path() + "fonts/Symbola.ttf"
128 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
129 color: 0, 0, 0, 0
130 text: "A"
131 text_size: None, None
132 size_hint: None, None
133 size: self.texture_size
134 Label:
135 id: action_list_mock_ubuntu_regular
136 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
137 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
138 color: 0, 0, 0, 0
139 text: "A"
140 text_size: None, None
141 size_hint: None, None
142 size: self.texture_size
143 Label:
144 id: action_list_mock_ubuntu_bold
145 font_name: h.path() + "fonts/Ubuntu-B.ttf"
146 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
147 color: 0, 0, 0, 0
148 text: "A"
149 text_size: None, None
150 size_hint: None, None
151 size: self.texture_size
152
153 155
154 Label: 156 Label:
155 id: action_list_title 157 id: action_list_title
@@ -166,7 +168,7 @@
166 id: action_list_icons 168 id: action_list_icons
167 font_name: h.path() + "fonts/Symbola.ttf" 169 font_name: h.path() + "fonts/Symbola.ttf"
168 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))
169 line_height: self.parent.min_height / max(action_list_mock_symbola.height,1) 171 line_height: self.parent.parent.symbola_line_height or 1
170 color: 0, 0, 0, 1 172 color: 0, 0, 0, 1
171 text: "\n".join(map(lambda x: x[0], self.parent.action_list)) 173 text: "\n".join(map(lambda x: x[0], self.parent.action_list))
172 text_size: None, self.parent.height 174 text_size: None, self.parent.height
@@ -178,7 +180,7 @@
178 id: action_list_names 180 id: action_list_names
179 font_name: h.path() + "fonts/Ubuntu-Regular.ttf" 181 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
180 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))
181 line_height: self.parent.min_height / max(action_list_mock_ubuntu_regular.height,1) 183 line_height: self.parent.parent.ubuntu_regular_line_height or 1
182 color: 0, 0, 0, 1 184 color: 0, 0, 0, 1
183 text: "\n".join(map(lambda x: x[1], self.parent.action_list)) 185 text: "\n".join(map(lambda x: x[1], self.parent.action_list))
184 text_size: None, self.parent.height 186 text_size: None, self.parent.height
@@ -189,7 +191,6 @@
189 size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size 191 size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size
190 192
191<PlayList>: 193<PlayList>:
192 min_height: min(playlist_mock_symbola.height, playlist_mock_ubuntu_regular.height, playlist_mock_ubuntu_bold.height)
193 size_hint: None, None 194 size_hint: None, None
194 canvas: 195 canvas:
195 Color: 196 Color:
@@ -197,40 +198,12 @@
197 Rectangle: 198 Rectangle:
198 pos: 0, 0 199 pos: 0, 0
199 size: self.width, self.height 200 size: self.width, self.height
200 Label:
201 id: playlist_mock_symbola
202 font_name: h.path() + "fonts/Symbola.ttf"
203 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
204 color: 0, 0, 0, 0
205 text: "A"
206 text_size: None, None
207 size_hint: None, None
208 size: self.texture_size
209 Label:
210 id: playlist_mock_ubuntu_regular
211 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
212 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
213 color: 0, 0, 0, 0
214 text: "A"
215 text_size: None, None
216 size_hint: None, None
217 size: self.texture_size
218 Label:
219 id: playlist_mock_ubuntu_bold
220 font_name: h.path() + "fonts/Ubuntu-B.ttf"
221 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
222 color: 0, 0, 0, 0
223 text: "A"
224 text_size: None, None
225 size_hint: None, None
226 size: self.texture_size
227
228 201
229 Label: 202 Label:
230 id: playlist_icons 203 id: playlist_icons
231 font_name: h.path() + "fonts/Symbola.ttf" 204 font_name: h.path() + "fonts/Symbola.ttf"
232 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) 205 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
233 line_height: self.parent.min_height / max(playlist_mock_symbola.height,1) 206 line_height: self.parent.parent.symbola_line_height or 1
234 color: 0, 0, 0, 1 207 color: 0, 0, 0, 1
235 text: "\n".join(map(lambda x: x[0], self.parent.playlist)) 208 text: "\n".join(map(lambda x: x[0], self.parent.playlist))
236 text_size: None, self.parent.height 209 text_size: None, self.parent.height
@@ -241,7 +214,7 @@
241 Label: 214 Label:
242 id: playlist_names 215 id: playlist_names
243 font_name: h.path() + "fonts/Ubuntu-Regular.ttf" # FIXME: Mettre en gras quand c'est en cours 216 font_name: h.path() + "fonts/Ubuntu-Regular.ttf" # FIXME: Mettre en gras quand c'est en cours
244 line_height: self.parent.min_height / max(playlist_mock_ubuntu_regular.height,1) 217 line_height: self.parent.parent.ubuntu_regular_line_height or 1
245 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) 218 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
246 color: 0, 0, 0, 1 219 color: 0, 0, 0, 1
247 text: "\n".join(map(lambda x: x[1], self.parent.playlist)) 220 text: "\n".join(map(lambda x: x[1], self.parent.playlist))