aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-07-27 12:50:17 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-07-27 12:50:17 +0200
commitea97edb3ea6fc9a222d7ec43ff517276a25c7f14 (patch)
treedf103c328b1e9e6d590b83830dfa270bbfc2c81a
parent635dea02d27ba499861085f8c7ead14d685bddf6 (diff)
downloadMusicSampler-ea97edb3ea6fc9a222d7ec43ff517276a25c7f14.tar.gz
MusicSampler-ea97edb3ea6fc9a222d7ec43ff517276a25c7f14.tar.zst
MusicSampler-ea97edb3ea6fc9a222d7ec43ff517276a25c7f14.zip
Change line cross color depending on state
-rw-r--r--helpers/key.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/helpers/key.py b/helpers/key.py
index 2b9d152..66e792d 100644
--- a/helpers/key.py
+++ b/helpers/key.py
@@ -108,7 +108,10 @@ class Key(ButtonBehavior, Widget):
108 state = StringProperty("") 108 state = StringProperty("")
109 109
110 def get_alias_line_cross_color(self): 110 def get_alias_line_cross_color(self):
111 if self.is_loaded_running() or self.is_loaded_protecting_repeat(): 111 if not self.is_failed() and (
112 not self.is_loaded(allow_substates=True)\
113 or self.is_loaded_running()\
114 or self.is_loaded_protecting_repeat()):
112 return [120/255, 120/255, 120/255, 1] 115 return [120/255, 120/255, 120/255, 1]
113 else: 116 else:
114 return [0, 0, 0, 0] 117 return [0, 0, 0, 0]