Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Saludame.activity/gui/utilities.py
diff options
context:
space:
mode:
Diffstat (limited to 'Saludame.activity/gui/utilities.py')
-rwxr-xr-xSaludame.activity/gui/utilities.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Saludame.activity/gui/utilities.py b/Saludame.activity/gui/utilities.py
index 64c9508..a331b2a 100755
--- a/Saludame.activity/gui/utilities.py
+++ b/Saludame.activity/gui/utilities.py
@@ -234,7 +234,7 @@ class TextBlock(Widget):
(b, _, a) = a.partition(eol)
self.lines.append(b)
- def prepare_text_block(self):
+ def render_lines(self):
self.rendered_lines = []
for l in self.lines:
r = self.font.render(l, False, self.color)
@@ -243,6 +243,9 @@ class TextBlock(Widget):
self.rect_absolute.height += r.get_rect().height
self.rendered_lines.append(r)
+ def prepare_text_block(self):
+ self.render_lines()
+
if self.type == "tooltip":
self.rect_absolute.height += 20
self.rect_absolute.width += 20
@@ -292,6 +295,7 @@ class TextBlock(Widget):
def switch_color_text(self, color):
self.color = color
+ self.render_lines()
self.set_dirty()
font_dict = {} # Chaches created font instances