]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - musicsampler.kv
Make kivy compatible with pyinstaller
[perso/Immae/Projets/Python/MusicSampler.git] / musicsampler.kv
index 17be1f538f96963b8c2edff1cbb187babbec8ac7..3bf344e61a744b9b199edab63b527843cf9c7cc5 100644 (file)
@@ -1,4 +1,5 @@
 #:import math math
+#:import h helpers
 
 <Key>:
   pad_col_sep: 0 if not self.pad_cols else self.parent.pad_x
@@ -32,7 +33,7 @@
       width: self.line_width
   Label:
     id: key_label
-    font_name: "fonts/Ubuntu-B.ttf"
+    font_name: h.path() + "fonts/Ubuntu-B.ttf"
     font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size))
     color: 0, 0, 0, 1
     text: self.parent.key_sym
@@ -44,7 +45,7 @@
     center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5
   Label:
     id: key_description_title
-    font_name: "fonts/Ubuntu-Regular.ttf"
+    font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
     font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2))
     color: 0, 0, 0, 1
     text: self.parent.description_title
@@ -55,7 +56,7 @@
     center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5
   Label:
     id: key_description
-    font_name: "fonts/Ubuntu-Regular.ttf"
+    font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
     font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2))
     color: 0, 0, 0, 1
     text: "\n".join(self.parent.description)
       size: self.width, self.height
   Label:
     id: action_list_title
-    font_name: "fonts/Ubuntu-B.ttf"
+    font_name: h.path() + "fonts/Ubuntu-B.ttf"
     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: "fonts/Symbola.ttf"
+    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
     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: "fonts/Ubuntu-Regular.ttf"
+    font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
     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.action_list))
       size: self.width, self.height
   Label:
     id: playlist_icons
-    font_name: "fonts/Symbola.ttf"
+    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
     color: 0, 0, 0, 1
     size: self.texture_size[0], self.parent.height
   Label:
     id: playlist_names
-    font_name: "fonts/Ubuntu-Regular.ttf" # FIXME: Mettre en gras quand c'est en cours
+    font_name: h.path() + "fonts/Ubuntu-Regular.ttf" # FIXME: Mettre en gras quand c'est en cours
     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))