[pitivi] overlay: Connect to the 'size-allocate' to allocate size



commit d520f6a20a57a8fe0926d11162fb93ff828229d4
Author: Thibault Saunier <tsaunier gnome org>
Date:   Sat Sep 17 10:52:47 2016 -0300

    overlay: Connect to the 'size-allocate' to allocate size
    
    Using the virtual method will make it happen to late and breaks
    the viewer.

 pitivi/viewer/overlay_stack.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/viewer/overlay_stack.py b/pitivi/viewer/overlay_stack.py
index 689ac76..6880416 100644
--- a/pitivi/viewer/overlay_stack.py
+++ b/pitivi/viewer/overlay_stack.py
@@ -45,9 +45,9 @@ class OverlayStack(Gtk.Overlay, Loggable):
                         Gdk.EventMask.LEAVE_NOTIFY_MASK |
                         Gdk.EventMask.ALL_EVENTS_MASK)
         self.add(sink_widget)
+        self.connect("size-allocate", self.__on_size_allocate)
 
-    def do_size_allocate(self, rectangle):
-        """Handles size allocation."""
+    def __on_size_allocate(self, widget, rectangle):
         self.window_size = numpy.array([rectangle.width,
                                         rectangle.height])
         for overlay in self.__overlays.values():


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]