From ea97edb3ea6fc9a222d7ec43ff517276a25c7f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 27 Jul 2016 12:50:17 +0200 Subject: Change line cross color depending on state --- helpers/key.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): state = StringProperty("") def get_alias_line_cross_color(self): - if self.is_loaded_running() or self.is_loaded_protecting_repeat(): + if not self.is_failed() and ( + not self.is_loaded(allow_substates=True)\ + or self.is_loaded_running()\ + or self.is_loaded_protecting_repeat()): return [120/255, 120/255, 120/255, 1] else: return [0, 0, 0, 0] -- cgit v1.2.3