#:import math math
-#:import h helpers
+#:import h music_sampler
<Key>:
pad_col_sep: 0 if not self.pad_cols else self.parent.pad_x
y: (self.parent.top-self.parent.y) - (self.row) * self.parent.key_size - (self.row - 1) * self.parent.key_sep
x: (self.col - 1) * self.parent.key_size + int(self.col - 1) * self.parent.key_sep + self.pad_col_sep
size_hint: None, None
- line_color: 120/255, 120/255, 120/255, 1
enabled: True
line_width: 2
row: 1
Line:
rounded_rectangle: self.x + self.line_width, self.y + self.line_width, self.width - 2 * self.line_width, self.height - 2 * self.line_width, 10
width: self.line_width
+ Color:
+ rgba: self.line_cross_color
+ Line:
+ points: self.x + self.line_width + 3, self.y + self.line_width + 3, self.x + self.width - 2 * self.line_width - 3, self.y + self.height - 2 * self.line_width - 3
+ width: self.line_width
+ Line:
+ points: self.x + self.line_width + 3, self.y + self.height - 2 * self.line_width - 3, self.x + self.width - 2 * self.line_width - 3, self.y + self.line_width + 3
+ width: self.line_width
Label:
id: key_label
- font_name: h.path() + "fonts/Ubuntu-B.ttf"
+ font_name: "Ubuntu"
+ bold: True
font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size))
color: 0, 0, 0, 1
text: self.parent.key_sym
center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5
Label:
id: key_description_title
- font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
+ font_name: "Ubuntu"
font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2))
color: 0, 0, 0, 1
text: self.parent.description_title
center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5
Label:
id: key_description
- font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
+ font_name: "Ubuntu"
font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2))
color: 0, 0, 0, 1
text: "\n".join(self.parent.description)
mapping_width: self.key_size * 18 + self.key_sep * 16 + self.key_pad_sep
mapping_x: self.border
mapping_y: self.top - self.mapping_height - self.border
+
+ key_list_width: 4 * (mock_ubuntu_regular.width or 0)
+ key_list_height: self.height - self.mapping_height - 3 * self.border
+ key_list_x: (self.action_list_width or 0) + 2 * self.border
+ key_list_y: self.border
+
action_list_height: self.height - self.mapping_height - 3 * self.border
- action_list_width: 3 * self.width / 4
+ action_list_width: 3 * self.width / 4 - self.key_list_width - self.border
action_list_x: self.border
action_list_y: self.border
+
play_list_height: self.action_list_height
play_list_width: self.width - self.action_list_width - 3* self.border
play_list_y: self.border
- play_list_x: self.action_list_width + 2 * self.border
+ play_list_x: self.action_list_width + self.key_list_width + 3 * self.border
min_height: min(mock_symbola.height, mock_ubuntu_regular.height, mock_ubuntu_bold.height)
symbola_line_height: self.min_height / max(mock_symbola.height,1)
ubuntu_bold_line_height: self.min_height / max(mock_ubuntu_bold.height,1)
Label:
id: mock_symbola
- font_name: h.path() + "fonts/Symbola.ttf"
+ font_name: "Symbola"
font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
color: 0, 0, 0, 0
text: "A"
size: self.texture_size
Label:
id: mock_ubuntu_regular
- font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
+ font_name: "Ubuntu"
font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
color: 0, 0, 0, 0
text: "A"
size: self.texture_size
Label:
id: mock_ubuntu_bold
- font_name: h.path() + "fonts/Ubuntu-B.ttf"
+ font_name: "Ubuntu"
+ bold: True
font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
color: 0, 0, 0, 0
text: "A"
id: ActionList
pos: self.parent.action_list_x, self.parent.action_list_y
size: self.parent.action_list_width, self.parent.action_list_height
+ KeyList:
+ id: KeyList
+ pos: self.parent.key_list_x, self.parent.key_list_y
+ size: self.parent.key_list_width, self.parent.key_list_height
PlayList:
id: PlayList
pos: self.parent.play_list_x, self.parent.play_list_y
size: self.parent.play_list_width, self.parent.play_list_height
+<KeyList>:
+ size_hint: None, None
+ canvas:
+ Color:
+ rgba: 250./255, 250./255, 250./255, 1
+ Rectangle:
+ pos: 0, 0
+ size: self.width, self.height
+ Label:
+ id: key_list_first
+ font_name: "Ubuntu"
+ bold: True
+ font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
+ color: 0, 0, 0, 1
+ text: self.parent.first_key
+ text_size: None, None
+ valign: "top"
+ halign: "center"
+ size_hint: None, None
+ size: self.parent.width, self.texture_size[1]
+ pos: 0, self.parent.height - self.height
+ Label:
+ id: key_list_second
+ font_name: "Ubuntu"
+ font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
+ color: 0, 0, 0, 1
+ text: self.parent.second_key
+ text_size: None, None
+ valign: "top"
+ halign: "center"
+ size_hint: None, None
+ size: self.parent.width, self.texture_size[1]
+ pos: 0, self.parent.height - key_list_first.height - self.height
+ Label:
+ id: key_list_third
+ font_name: "Ubuntu"
+ font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
+ color: 0, 0, 0, 0.75
+ text: self.parent.third_key
+ text_size: None, None
+ valign: "top"
+ halign: "center"
+ size_hint: None, None
+ size: self.parent.width, self.texture_size[1]
+ pos: 0, self.parent.height - key_list_first.height - key_list_second.height - self.height
+ Label:
+ id: key_list_rest
+ font_name: "Ubuntu"
+ font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
+ color: 0, 0, 0, 0.5
+ text: "\n".join(self.parent.keylist[3:])
+ text_size: None, None
+ valign: "top"
+ halign: "center"
+ size_hint: None, None
+ size: self.parent.width, self.texture_size[1]
+ pos: 0, self.parent.height - key_list_first.height - key_list_second.height - key_list_third.height - self.height
+
<ActionList>:
size_hint: None, None
canvas:
Label:
id: action_list_title
- font_name: h.path() + "fonts/Ubuntu-B.ttf"
+ font_name: "Ubuntu"
+ bold: True
font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
color: 0, 0, 0, 1
text: self.parent.action_title
size: self.texture_size[0], self.parent.height
Label:
id: action_list_icons
- font_name: h.path() + "fonts/Symbola.ttf"
+ font_name: "Symbola"
font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
line_height: self.parent.parent.symbola_line_height or 1
color: 0, 0, 0, 1
size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size
Label:
id: action_list_names
- font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
+ font_name: "Ubuntu"
font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
line_height: self.parent.parent.ubuntu_regular_line_height or 1
color: 0, 0, 0, 1
Label:
id: playlist_icons
- font_name: h.path() + "fonts/Symbola.ttf"
+ font_name: "Symbola"
font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
line_height: self.parent.parent.symbola_line_height or 1
color: 0, 0, 0, 1
size: self.texture_size[0], self.parent.height
Label:
id: playlist_names
- font_name: h.path() + "fonts/Ubuntu-Regular.ttf" # FIXME: Mettre en gras quand c'est en cours
+ font_name: "Ubuntu" # FIXME: Mettre en gras quand c'est en cours
line_height: self.parent.parent.ubuntu_regular_line_height or 1
font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
color: 0, 0, 0, 1
size_hint: None, None
pos: 15, self.y
size: self.texture_size[0], self.parent.height
+ Label:
+ canvas.before:
+ Color:
+ rgba: 250./255, 250./255, 250./255, 1
+ Rectangle:
+ pos: self.pos
+ size: self.width, self.height
+ id: playlist_times
+ font_name: "Ubuntu"
+ line_height: self.parent.parent.ubuntu_regular_line_height or 1
+ font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
+ color: 0, 0, 0, 1
+ text: "\n".join(map(lambda x: x[2], self.parent.playlist))
+ text_size: None, self.parent.height
+ halign: "left"
+ valign: "top"
+ size_hint: None, None
+ pos: self.parent.width - 3 * self.width / 2 - 2 * (self.parent.parent.border or 0), self.y
+ size: self.texture_size[0], self.parent.height
<Mapping>:
size_hint: None, None
Rectangle:
pos: 0, 0
size: self.width, self.height
+ Color:
+ rgba: self.ready_color
+ Ellipse:
+ pos: self.width - self.key_size / 2, self.height - self.key_size /2
+ size: self.key_size / 3, self.key_size / 3
+ Label:
+ font_name: "Ubuntu"
+ font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
+ color: 0, 0, 0, 1
+ text: "volume: {}%".format(self.parent.master_volume)
+ valign: "top"
+ size_hint: None, None
+ size: self.texture_size[0], self.texture_size[1]
+ x: self.parent.width - self.width - 2 * self.parent.key_size / 3
+ center_y: self.parent.height - self.height
Key:
id: Key_27
key_code: 27