don't discard width padding
authorNeil <neil@dip.sun.ac.za>
Wed, 14 May 2014 22:22:50 +0000 (00:22 +0200)
committerNeil <neil@dip.sun.ac.za>
Wed, 14 May 2014 22:22:50 +0000 (00:22 +0200)
naja/widgets/text.py

index 0521e9b6a64483d47f3edc90c5e319f24b9b18f1..d753e8a12aed87987e9f6f273e861d678eda5612 100644 (file)
@@ -81,7 +81,7 @@ class TextBoxWidget(TextWidget):
             line_surface = self.render_line(line)
             line_rect = line_surface.get_rect()
             rendered_lines.append(line_surface)
-            width = max(width, line_rect.width)
+            width = max(width, line_rect.width + self.padding)
             height += line_rect.height
 
         self.surface = pygame.surface.Surface((width, height),