aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--musicsampler.kv67
1 files changed, 65 insertions, 2 deletions
diff --git a/musicsampler.kv b/musicsampler.kv
index 3bf344e..137b7bd 100644
--- a/musicsampler.kv
+++ b/musicsampler.kv
@@ -113,6 +113,7 @@
113 size: self.parent.play_list_width, self.parent.play_list_height 113 size: self.parent.play_list_width, self.parent.play_list_height
114 114
115<ActionList>: 115<ActionList>:
116 min_height: min(action_list_mock_symbola.height, action_list_mock_ubuntu_regular.height, action_list_mock_ubuntu_bold.height)
116 size_hint: None, None 117 size_hint: None, None
117 canvas: 118 canvas:
118 Color: 119 Color:
@@ -120,6 +121,36 @@
120 Rectangle: 121 Rectangle:
121 pos: 0, 0 122 pos: 0, 0
122 size: self.width, self.height 123 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
123 Label: 154 Label:
124 id: action_list_title 155 id: action_list_title
125 font_name: h.path() + "fonts/Ubuntu-B.ttf" 156 font_name: h.path() + "fonts/Ubuntu-B.ttf"
@@ -135,7 +166,7 @@
135 id: action_list_icons 166 id: action_list_icons
136 font_name: h.path() + "fonts/Symbola.ttf" 167 font_name: h.path() + "fonts/Symbola.ttf"
137 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) 168 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
138 line_height: 1.2 # FIXME: Donner la bonne taille de label 169 line_height: self.parent.min_height / max(action_list_mock_symbola.height,1)
139 color: 0, 0, 0, 1 170 color: 0, 0, 0, 1
140 text: "\n".join(map(lambda x: x[0], self.parent.action_list)) 171 text: "\n".join(map(lambda x: x[0], self.parent.action_list))
141 text_size: None, self.parent.height 172 text_size: None, self.parent.height
@@ -147,6 +178,7 @@
147 id: action_list_names 178 id: action_list_names
148 font_name: h.path() + "fonts/Ubuntu-Regular.ttf" 179 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
149 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) 180 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)
150 color: 0, 0, 0, 1 182 color: 0, 0, 0, 1
151 text: "\n".join(map(lambda x: x[1], self.parent.action_list)) 183 text: "\n".join(map(lambda x: x[1], self.parent.action_list))
152 text_size: None, self.parent.height 184 text_size: None, self.parent.height
@@ -157,6 +189,7 @@
157 size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size 189 size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size
158 190
159<PlayList>: 191<PlayList>:
192 min_height: min(playlist_mock_symbola.height, playlist_mock_ubuntu_regular.height, playlist_mock_ubuntu_bold.height)
160 size_hint: None, None 193 size_hint: None, None
161 canvas: 194 canvas:
162 Color: 195 Color:
@@ -165,10 +198,39 @@
165 pos: 0, 0 198 pos: 0, 0
166 size: self.width, self.height 199 size: self.width, self.height
167 Label: 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
229 Label:
168 id: playlist_icons 230 id: playlist_icons
169 font_name: h.path() + "fonts/Symbola.ttf" 231 font_name: h.path() + "fonts/Symbola.ttf"
170 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) 232 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
171 line_height: 1.2 # FIXME: Donner la bonne taille de label 233 line_height: self.parent.min_height / max(playlist_mock_symbola.height,1)
172 color: 0, 0, 0, 1 234 color: 0, 0, 0, 1
173 text: "\n".join(map(lambda x: x[0], self.parent.playlist)) 235 text: "\n".join(map(lambda x: x[0], self.parent.playlist))
174 text_size: None, self.parent.height 236 text_size: None, self.parent.height
@@ -179,6 +241,7 @@
179 Label: 241 Label:
180 id: playlist_names 242 id: playlist_names
181 font_name: h.path() + "fonts/Ubuntu-Regular.ttf" # FIXME: Mettre en gras quand c'est en cours 243 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)
182 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) 245 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
183 color: 0, 0, 0, 1 246 color: 0, 0, 0, 1
184 text: "\n".join(map(lambda x: x[1], self.parent.playlist)) 247 text: "\n".join(map(lambda x: x[1], self.parent.playlist))