]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - helpers/key.py
Add border around running keys
[perso/Immae/Projets/Python/MusicSampler.git] / helpers / key.py
index 4ec08d19aa4c98185dcf9e12d2abb8a751c57d2c..9099f00925b28e0764aa4eb6f6afa1743a595993 100644 (file)
@@ -96,6 +96,18 @@ class Key(ButtonBehavior, Widget):
     description = ListProperty([])
     state = StringProperty("")
 
+    def get_alias_line_color(self):
+        if self.is_loaded_running():
+            return [0, 0, 0, 1]
+        else:
+            return [120/255, 120/255, 120/255, 1]
+
+    def set_alias_line_color(self):
+        pass
+
+    line_color = AliasProperty(get_alias_line_color, set_alias_line_color,
+            bind=['state'])
+
     def get_alias_color(self):
         if self.is_loaded_inactive():
             return [1, 1, 1, 1]