[pitivi: 2/8] use tracks canvas item rather than allocation for playhead height



commit 502724696bb21432df70d1c43493bff8a06f9dc5
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date:   Tue Oct 12 16:50:28 2010 +0100

    use tracks canvas item rather than allocation for playhead height

 pitivi/ui/timelinecanvas.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/timelinecanvas.py b/pitivi/ui/timelinecanvas.py
index d4b635b..969ff3f 100644
--- a/pitivi/ui/timelinecanvas.py
+++ b/pitivi/ui/timelinecanvas.py
@@ -274,13 +274,14 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
     def _request_size(self):
         alloc = self.get_allocation()
         self.set_bounds(0, 0, alloc.width, alloc.height)
-        self._playhead.props.height = alloc.height + 10
+        self._playhead.props.height = max(alloc.width,
+            self.tracks.get_bounds().y2 + 10)
 
     def zoomChanged(self):
+        self.queue_draw()
         if self.timeline:
             self.timeline.dead_band = self.pixelToNs(
                 self.settings.edgeSnapDeadband)
-            self._request_size()
             self.timelinePositionChanged(self.position)
 
 ## settings callbacks



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