aboutsummaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-21 10:31:12 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-21 10:31:12 +0200
commitd05b1117dfb842959f89797174718ab58d04dd77 (patch)
treeb114188b73dba4fcfb39bac19c8ebdfc68e68b86 /helpers
parentfba0caf0417cbb4e5b370e16e4b0c855c74094c1 (diff)
downloadMusicSampler-d05b1117dfb842959f89797174718ab58d04dd77.tar.gz
MusicSampler-d05b1117dfb842959f89797174718ab58d04dd77.tar.zst
MusicSampler-d05b1117dfb842959f89797174718ab58d04dd77.zip
Give default color to keys
Diffstat (limited to 'helpers')
-rw-r--r--helpers/key.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/helpers/key.py b/helpers/key.py
index 612758f..56cccaa 100644
--- a/helpers/key.py
+++ b/helpers/key.py
@@ -40,15 +40,15 @@ class Key:
40 self.inner_color = self.default_inner_color 40 self.inner_color = self.default_inner_color
41 self.actions = [] 41 self.actions = []
42 self.description = [] 42 self.description = []
43 self.custom_color = None 43 self.custom_color = self.mapped_inner_color
44 self.custom_unready_color = None 44 self.custom_unready_color = self.mapped_unready_inner_color
45 45
46 def square(self, all_actions_ready): 46 def square(self, all_actions_ready):
47 if self.has_actions(): 47 if self.has_actions():
48 if all_actions_ready: 48 if all_actions_ready:
49 self.inner_color = self.custom_color or self.mapped_inner_color 49 self.inner_color = self.custom_color
50 else: 50 else:
51 self.inner_color = self.custom_unready_color or self.mapped_unready_inner_color 51 self.inner_color = self.custom_unready_color
52 52
53 return RoundedRect((0, 0, self.width, self.height), 53 return RoundedRect((0, 0, self.width, self.height),
54 self.outer_color, self.inner_color, self.linewidth) 54 self.outer_color, self.inner_color, self.linewidth)