[pitivi/1.0] timeline: Fix warnings about scrollbars



commit 4dc9c3574d9972cb61661ae4b36192c6fca717c2
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Fri Sep 1 13:48:24 2017 +0200

    timeline: Fix warnings about scrollbars
    
    This reverts 2c01993cdc10fd5056c94b30b300927cf41264a3 which ironically
    had the same title.
    
    The warning message is different though:
    
    (pitivi:3): Gtk-WARNING **: Allocating size to GtkScrollbar 0x2d310b0 without calling 
gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
    
    Differential Revision: https://phabricator.freedesktop.org/D1861

 pitivi/timeline/timeline.py |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 6d02d1a..86cb3db 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1448,12 +1448,9 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
 
         self.attach(zoom_box, 0, 0, 1, 1)
         self.attach(self.ruler, 1, 0, 1, 1)
+        self.attach(self.timeline, 0, 1, 2, 1)
         self.attach(vscrollbar, 2, 1, 1, 1)
         self.attach(hscrollbar, 1, 2, 1, 1)
-        # Make sure the timeline is attached after the scrollbars, otherwise
-        # a lot of warnings are printed because they are drawn before being
-        # allocated a size, for some reason.
-        self.attach(self.timeline, 0, 1, 2, 1)
         self.attach(self.toolbar, 3, 1, 1, 1)
 
         self.set_margin_top(SPACING)


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