# HG changeset patch # User Jeremy Thurgood # Date 1378543357 -7200 # Node ID c0ce236f153c5d33e27f22ac67f7849233ff5ae2 # Parent 85d4c97ddac2caff7db844e33528e2c7772d9507 Pad multiline text. diff -r 85d4c97ddac2 -r c0ce236f153c nagslang/widgets/text.py --- a/nagslang/widgets/text.py Sat Sep 07 10:39:01 2013 +0200 +++ b/nagslang/widgets/text.py Sat Sep 07 10:42:37 2013 +0200 @@ -68,12 +68,14 @@ width = max(width, surface.get_rect().width) height += surface.get_rect().height surfaces.append(surface) + width += 2 * self.padding + height += 2 * self.padding self.surface = pygame.surface.Surface((width, height), pygame.locals.SRCALPHA) self.surface.fill(self.bg_colour) y = 0 for surface in surfaces: - self.surface.blit(surface, (0, y)) + self.surface.blit(surface, (self.padding, y + self.padding)) y += surface.get_rect().height self.text_rect = self.surface.get_rect() if not self.size: