X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=musicsampler.kv;h=4a44069c03bf1154f023470ad59f2cafbaf3e63d;hb=8601cdd853f205bdbc83dd78220f5e99ab624b68;hp=3bf344e61a744b9b199edab63b527843cf9c7cc5;hpb=bb69f62e140efde8e93f7b62bf8723113bf30b06;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git diff --git a/musicsampler.kv b/musicsampler.kv index 3bf344e..4a44069 100644 --- a/musicsampler.kv +++ b/musicsampler.kv @@ -94,6 +94,38 @@ play_list_y: self.border play_list_x: self.action_list_width + 2 * 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_regular_line_height: self.min_height / max(mock_ubuntu_regular.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_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10)) + color: 0, 0, 0, 0 + text: "A" + text_size: None, None + size_hint: None, None + size: self.texture_size + Label: + id: mock_ubuntu_regular + font_name: h.path() + "fonts/Ubuntu-Regular.ttf" + font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10)) + color: 0, 0, 0, 0 + text: "A" + text_size: None, None + size_hint: None, None + size: self.texture_size + Label: + id: mock_ubuntu_bold + font_name: h.path() + "fonts/Ubuntu-B.ttf" + font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10)) + color: 0, 0, 0, 0 + text: "A" + text_size: None, None + size_hint: None, None + size: self.texture_size + Mapping: id: Mapping pos: self.parent.mapping_x, self.parent.mapping_y @@ -120,6 +152,7 @@ Rectangle: pos: 0, 0 size: self.width, self.height + Label: id: action_list_title font_name: h.path() + "fonts/Ubuntu-B.ttf" @@ -135,7 +168,7 @@ id: action_list_icons font_name: h.path() + "fonts/Symbola.ttf" font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) - line_height: 1.2 # FIXME: Donner la bonne taille de label + line_height: self.parent.parent.symbola_line_height or 1 color: 0, 0, 0, 1 text: "\n".join(map(lambda x: x[0], self.parent.action_list)) text_size: None, self.parent.height @@ -147,6 +180,7 @@ id: action_list_names font_name: h.path() + "fonts/Ubuntu-Regular.ttf" 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 text: "\n".join(map(lambda x: x[1], self.parent.action_list)) text_size: None, self.parent.height @@ -164,11 +198,12 @@ Rectangle: pos: 0, 0 size: self.width, self.height + Label: id: playlist_icons font_name: h.path() + "fonts/Symbola.ttf" font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10)) - line_height: 1.2 # FIXME: Donner la bonne taille de label + line_height: self.parent.parent.symbola_line_height or 1 color: 0, 0, 0, 1 text: "\n".join(map(lambda x: x[0], self.parent.playlist)) text_size: None, self.parent.height @@ -179,6 +214,7 @@ Label: id: playlist_names font_name: h.path() + "fonts/Ubuntu-Regular.ttf" # 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 text: "\n".join(map(lambda x: x[1], self.parent.playlist))