aboutsummaryrefslogtreecommitdiff
path: root/helpers/key.py
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-19 22:44:54 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-19 22:44:54 +0200
commit23b7e0e5daf024e87d967ede3dfe6777a07e7469 (patch)
tree066f4d4c1678ac4ce4f441d042b36b30818c9597 /helpers/key.py
parentb86db9f1679c855c2d39a0b116f846d271271a2c (diff)
downloadMusicSampler-23b7e0e5daf024e87d967ede3dfe6777a07e7469.tar.gz
MusicSampler-23b7e0e5daf024e87d967ede3dfe6777a07e7469.tar.zst
MusicSampler-23b7e0e5daf024e87d967ede3dfe6777a07e7469.zip
Fix threading problems with ipython
Diffstat (limited to 'helpers/key.py')
-rw-r--r--helpers/key.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/helpers/key.py b/helpers/key.py
index 9a6cb3b..e9e485d 100644
--- a/helpers/key.py
+++ b/helpers/key.py
@@ -72,7 +72,7 @@ class Key:
72 ) 72 )
73 73
74 def set_description(self, description): 74 def set_description(self, description):
75 self.description = description 75 self.description = [str(desc) for desc in description]
76 76
77 def set_color(self, color): 77 def set_color(self, color):
78 self.custom_color = tuple(color) 78 self.custom_color = tuple(color)
@@ -97,7 +97,7 @@ class Key:
97 self.surface.blit(text, (5,5)) 97 self.surface.blit(text, (5,5))
98 98
99 is_first_line = True 99 is_first_line = True
100 offset = 11 + text_police.get_linesize() 100 offset = 11 + text_police.get_linesize() - 4
101 first_line_offset = 18 101 first_line_offset = 18
102 for description in self.description: 102 for description in self.description:
103 text = text_police.render(description, True, (0,0,0)) 103 text = text_police.render(description, True, (0,0,0))
@@ -105,8 +105,8 @@ class Key:
105 self.surface.blit(text, (first_line_offset, 9)) 105 self.surface.blit(text, (first_line_offset, 9))
106 is_first_line = False 106 is_first_line = False
107 else: 107 else:
108 self.surface.blit(text, (5, offset)) 108 self.surface.blit(text, (3, offset))
109 offset += text_police.get_linesize() 109 offset += text_police.get_linesize() - 4
110 110
111 background_surface.blit(self.surface, self.position) 111 background_surface.blit(self.surface, self.position)
112 self.draw_lock.release() 112 self.draw_lock.release()