From 1094ab1ac48313b0c1caec15bc4fb6c584efa047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 27 Jul 2016 00:21:31 +0200 Subject: Add border around running keys --- helpers/key.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'helpers') diff --git a/helpers/key.py b/helpers/key.py index 4ec08d1..9099f00 100644 --- a/helpers/key.py +++ b/helpers/key.py @@ -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] -- cgit v1.2.3