]> git.0d.be Git - jack_mixer.git/commitdiff
Idk if it helps, but check existence of width, height in custom slider invalidate_all()
authorDaniel Sheeler <dsheeler@pobox.com>
Thu, 25 Jun 2020 09:38:53 +0000 (04:38 -0500)
committerDaniel Sheeler <dsheeler@pobox.com>
Thu, 25 Jun 2020 09:39:00 +0000 (04:39 -0500)
slider.py

index 836cfcd16c424046ae7519fc4163dbcf06a709e6..50389ab7d71ef3ac9fc22667eec67ddefb08593e 100644 (file)
--- a/slider.py
+++ b/slider.py
@@ -161,12 +161,12 @@ class CustomSliderWidget(Gtk.DrawingArea):
         self.font_size = 10
 
     def on_size_request(self, widget, requisition):
-        #print "size-request, %u x %u" % (requisition.width, requisition.height)
         requisition.width = 20
         return
 
     def invalidate_all(self):
-        self.queue_draw_area(0, 0, int(self.width), int(self.height))
+        if hasattr(self, 'width') and hasattr(self, 'height'):
+            self.queue_draw_area(0, 0, int(self.width), int(self.height))
 
     def draw(self, cairo_ctx):
         if self.has_focus():