diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-27 12:22:59 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-27 12:22:59 +0200 |
commit | 635dea02d27ba499861085f8c7ead14d685bddf6 (patch) | |
tree | f8baccfb5549a9c4cb50df582b9dd9c274291376 /helpers/key.py | |
parent | 70cfb266c677c77675def8ac26babf7c8ac7d0f8 (diff) | |
download | MusicSampler-635dea02d27ba499861085f8c7ead14d685bddf6.tar.gz MusicSampler-635dea02d27ba499861085f8c7ead14d685bddf6.tar.zst MusicSampler-635dea02d27ba499861085f8c7ead14d685bddf6.zip |
Add cross when key is not usable
Diffstat (limited to 'helpers/key.py')
-rw-r--r-- | helpers/key.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/helpers/key.py b/helpers/key.py index 113cf8e..2b9d152 100644 --- a/helpers/key.py +++ b/helpers/key.py | |||
@@ -107,6 +107,20 @@ class Key(ButtonBehavior, Widget): | |||
107 | description = ListProperty([]) | 107 | description = ListProperty([]) |
108 | state = StringProperty("") | 108 | state = StringProperty("") |
109 | 109 | ||
110 | def get_alias_line_cross_color(self): | ||
111 | if self.is_loaded_running() or self.is_loaded_protecting_repeat(): | ||
112 | return [120/255, 120/255, 120/255, 1] | ||
113 | else: | ||
114 | return [0, 0, 0, 0] | ||
115 | |||
116 | def set_alias_line_cross_color(self): | ||
117 | pass | ||
118 | |||
119 | line_cross_color = AliasProperty( | ||
120 | get_alias_line_cross_color, | ||
121 | set_alias_line_cross_color, | ||
122 | bind=['state']) | ||
123 | |||
110 | def get_alias_line_color(self): | 124 | def get_alias_line_color(self): |
111 | if self.is_loaded_running(): | 125 | if self.is_loaded_running(): |
112 | return [0, 0, 0, 1] | 126 | return [0, 0, 0, 1] |