[pitivi] ruler.py: take pixmap offset into account when drawing shaded area



commit 72ac359c611537b0bdda3d18e21140fadb15d2b2
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Tue Sep 8 18:33:42 2009 -0700

    ruler.py: take pixmap offset into account when drawing shaded area

 pitivi/ui/ruler.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/ruler.py b/pitivi/ui/ruler.py
index 04b3299..37e2280 100644
--- a/pitivi/ui/ruler.py
+++ b/pitivi/ui/ruler.py
@@ -271,12 +271,13 @@ class ScaleRuler(gtk.Layout, Zoomable, Loggable):
             0, 0,
             allocation.width, allocation.height)
 
-        if self.getShadedDuration() > 0:
+        offset = int(Zoomable.nsToPixel(self.getShadedDuration())) - self.pixmap_offset
+        if offset > 0:
             self.pixmap.draw_rectangle(
                 self.style.bg_gc[gtk.STATE_ACTIVE],
                 True,
                 0, 0,
-                self.getShadedDurationWidth(),
+                offset,
                 allocation.height)
 
     def drawRuler(self, allocation):



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