aboutsummaryrefslogtreecommitdiff
path: root/music_sampler.kv
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-26 23:10:17 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-26 23:10:17 +0200
commit65ec4d2a87bfe0dcf1250ec8dc61225d4ed66325 (patch)
tree1e204169cb733fe7321bef66ccc414736baa1e5d /music_sampler.kv
parente4846541aa226de8b231cc401fcaa6f058246d1c (diff)
downloadMusicSampler-65ec4d2a87bfe0dcf1250ec8dc61225d4ed66325.tar.gz
MusicSampler-65ec4d2a87bfe0dcf1250ec8dc61225d4ed66325.tar.zst
MusicSampler-65ec4d2a87bfe0dcf1250ec8dc61225d4ed66325.zip
Show last used keys
Diffstat (limited to 'music_sampler.kv')
-rw-r--r--music_sampler.kv68
1 files changed, 66 insertions, 2 deletions
diff --git a/music_sampler.kv b/music_sampler.kv
index 4a44069..d21c5fb 100644
--- a/music_sampler.kv
+++ b/music_sampler.kv
@@ -85,14 +85,21 @@
85 mapping_width: self.key_size * 18 + self.key_sep * 16 + self.key_pad_sep 85 mapping_width: self.key_size * 18 + self.key_sep * 16 + self.key_pad_sep
86 mapping_x: self.border 86 mapping_x: self.border
87 mapping_y: self.top - self.mapping_height - self.border 87 mapping_y: self.top - self.mapping_height - self.border
88
89 key_list_width: 4 * (mock_ubuntu_regular.width or 0)
90 key_list_height: self.height - self.mapping_height - 3 * self.border
91 key_list_x: (self.action_list_width or 0) + 2 * self.border
92 key_list_y: self.border
93
88 action_list_height: self.height - self.mapping_height - 3 * self.border 94 action_list_height: self.height - self.mapping_height - 3 * self.border
89 action_list_width: 3 * self.width / 4 95 action_list_width: 3 * self.width / 4 - self.key_list_width - self.border
90 action_list_x: self.border 96 action_list_x: self.border
91 action_list_y: self.border 97 action_list_y: self.border
98
92 play_list_height: self.action_list_height 99 play_list_height: self.action_list_height
93 play_list_width: self.width - self.action_list_width - 3* self.border 100 play_list_width: self.width - self.action_list_width - 3* self.border
94 play_list_y: self.border 101 play_list_y: self.border
95 play_list_x: self.action_list_width + 2 * self.border 102 play_list_x: self.action_list_width + self.key_list_width + 3 * self.border
96 103
97 min_height: min(mock_symbola.height, mock_ubuntu_regular.height, mock_ubuntu_bold.height) 104 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) 105 symbola_line_height: self.min_height / max(mock_symbola.height,1)
@@ -139,11 +146,68 @@
139 id: ActionList 146 id: ActionList
140 pos: self.parent.action_list_x, self.parent.action_list_y 147 pos: self.parent.action_list_x, self.parent.action_list_y
141 size: self.parent.action_list_width, self.parent.action_list_height 148 size: self.parent.action_list_width, self.parent.action_list_height
149 KeyList:
150 id: KeyList
151 pos: self.parent.key_list_x, self.parent.key_list_y
152 size: self.parent.key_list_width, self.parent.key_list_height
142 PlayList: 153 PlayList:
143 id: PlayList 154 id: PlayList
144 pos: self.parent.play_list_x, self.parent.play_list_y 155 pos: self.parent.play_list_x, self.parent.play_list_y
145 size: self.parent.play_list_width, self.parent.play_list_height 156 size: self.parent.play_list_width, self.parent.play_list_height
146 157
158<KeyList>:
159 size_hint: None, None
160 canvas:
161 Color:
162 rgba: 250./255, 250./255, 250./255, 1
163 Rectangle:
164 pos: 0, 0
165 size: self.width, self.height
166 Label:
167 id: key_list_first
168 font_name: h.path() + "fonts/Ubuntu-B.ttf"
169 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
170 color: 0, 0, 0, 1
171 text: self.parent.first_key
172 text_size: None, None
173 valign: "top"
174 size_hint: None, None
175 size: self.parent.width, self.texture_size[1]
176 pos: 0, self.parent.height - self.height
177 Label:
178 id: key_list_second
179 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
180 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
181 color: 0, 0, 0, 1
182 text: self.parent.second_key
183 text_size: None, None
184 valign: "top"
185 size_hint: None, None
186 size: self.parent.width, self.texture_size[1]
187 pos: 0, self.parent.height - key_list_first.height - self.height
188 Label:
189 id: key_list_third
190 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
191 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
192 color: 0, 0, 0, 0.75
193 text: self.parent.third_key
194 text_size: None, None
195 valign: "top"
196 size_hint: None, None
197 size: self.parent.width, self.texture_size[1]
198 pos: 0, self.parent.height - key_list_first.height - key_list_second.height - self.height
199 Label:
200 id: key_list_rest
201 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
202 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
203 color: 0, 0, 0, 0.5
204 text: "\n".join(self.parent.keylist[3:])
205 text_size: None, None
206 valign: "top"
207 size_hint: None, None
208 size: self.parent.width, self.texture_size[1]
209 pos: 0, self.parent.height - key_list_first.height - key_list_second.height - key_list_third.height - self.height
210
147<ActionList>: 211<ActionList>:
148 size_hint: None, None 212 size_hint: None, None
149 canvas: 213 canvas: