Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/common/Util/ThemeWidgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'common/Util/ThemeWidgets.py')
-rw-r--r--common/Util/ThemeWidgets.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/common/Util/ThemeWidgets.py b/common/Util/ThemeWidgets.py
index 018c558..0d19f11 100644
--- a/common/Util/ThemeWidgets.py
+++ b/common/Util/ThemeWidgets.py
@@ -704,17 +704,10 @@ class ImageButton(Gtk.Button):
self.down = False
self.connect('draw', self.draw)
- self.connect('size-allocate', self.size_allocate)
-
-
- def size_allocate(self, widget, allocation):
- self.alloc = allocation
- self.drawX = allocation.x + allocation.width//2
- self.drawY = allocation.y + allocation.height//2
def draw(self, widget, cr):
- cr.rectangle(0, 0, 100, 100)
- cr.fill()
+ alloc = self.get_allocation()
+ cr.rectangle(0, 0, alloc.width, alloc.height)
if self.is_png:
cr.set_source_surface(self.image[self.curImage], 0, 0)
cr.paint()