Apply self.pos to TextBoxWidget rendering.
authorSimon Cross <hodgestar@gmail.com>
Sun, 11 May 2014 20:40:36 +0000 (22:40 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sun, 11 May 2014 20:40:36 +0000 (22:40 +0200)
naja/widgets/text.py

index 9ecd0db47322287e214a0682b063a4b18ee2c9cf..74ca641bf7c1186144c94a2b03123b4e078677ec 100644 (file)
@@ -90,9 +90,9 @@ class TextBoxWidget(TextWidget):
 
     def draw(self, surface):
         self.surface.fill(self.bg_colour)
-        y = 0
+        y = self.pos[1]
         for line in self.lines:
-            surface.blit(line, (self.padding, y + self.padding))
+            surface.blit(line, (self.pos[0] + self.padding, y + self.padding))
             y += line.get_rect().height
         self.text_rect = surface.get_rect()
         if not self.size: