X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git;a=blobdiff_plain;f=music_sampler.kv;h=fa3862724bd73c6e7a642d32be0048cfa545d1a3;hp=d21c5fbafba0d37d9c77599b40a85a8bd7c80a4c;hb=201d8411d7e1f70f13ced3fc797a696e6593f3a0;hpb=65ec4d2a87bfe0dcf1250ec8dc61225d4ed66325 diff --git a/music_sampler.kv b/music_sampler.kv index d21c5fb..fa38627 100644 --- a/music_sampler.kv +++ b/music_sampler.kv @@ -8,7 +8,6 @@ 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 @@ -31,6 +30,14 @@ 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" @@ -171,6 +178,7 @@ 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 @@ -182,6 +190,7 @@ 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 @@ -193,6 +202,7 @@ 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 @@ -204,6 +214,7 @@ 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 @@ -288,6 +299,25 @@ 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: h.path() + "fonts/Ubuntu-Regular.ttf" + 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 : size_hint: None, None @@ -301,6 +331,21 @@ 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: h.path() + "fonts/Ubuntu-Regular.ttf" + 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