Changeset 405:c0ce236f153c


Ignore:
Timestamp:
Sep 7, 2013, 8:42:37 AM (7 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
rebase_source:
b5c9a5b0e99bdc87c94b3b5a72be46f2b0053391
Message:

Pad multiline text.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/widgets/text.py

    r395 r405  
    6969            height += surface.get_rect().height
    7070            surfaces.append(surface)
     71        width += 2 * self.padding
     72        height += 2 * self.padding
    7173        self.surface = pygame.surface.Surface((width, height),
    7274                                              pygame.locals.SRCALPHA)
     
    7476        y = 0
    7577        for surface in surfaces:
    76             self.surface.blit(surface, (0, y))
     78            self.surface.blit(surface, (self.padding, y + self.padding))
    7779            y += surface.get_rect().height
    7880        self.text_rect = self.surface.get_rect()
Note: See TracChangeset for help on using the changeset viewer.