[pitivi] layer: Make sure layer are at least as long as the container timeline



commit 0216cd8ad6fb0ba5f38fad0199b0bd4518df8f19
Author: Thibault Saunier <tsaunier gnome org>
Date:   Tue May 5 22:47:23 2015 +0200

    layer: Make sure layer are at least as long as the container timeline

 pitivi/timeline/layer.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/layer.py b/pitivi/timeline/layer.py
index 784ddd3..975331c 100644
--- a/pitivi/timeline/layer.py
+++ b/pitivi/timeline/layer.py
@@ -482,8 +482,10 @@ class LayerLayout(Gtk.Layout, Loggable):
                     window.raise_()
             self._changed = False
 
-        self.props.width = timelineUtils.Zoomable.nsToPixel(self.timeline.bTimeline.props.duration) + 500
-        self.props.width_request = timelineUtils.Zoomable.nsToPixel(self.timeline.bTimeline.props.duration) 
+ 500
+        self.props.width = max(self.timeline.layout.get_allocation().width,
+                               timelineUtils.Zoomable.nsToPixel(self.timeline.bTimeline.props.duration))
+        self.props.width_request = max(self.timeline.layout.get_allocation().width,
+                                       
timelineUtils.Zoomable.nsToPixel(self.timeline.bTimeline.props.duration))
 
         for child in self._children:
             self.propagate_draw(child, cr)


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