[pitivi: 1/11] do not put canvas in a scrolled window. use our own scroll bars instead



commit 7a038bcf39bd78551b43cae66aacbf2ad1d149d8
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date:   Fri Oct 1 14:33:46 2010 +0100

    do not put canvas in a scrolled window. use our own scroll bars instead

 pitivi/ui/timeline.py |   27 +++++++++------------------
 1 files changed, 9 insertions(+), 18 deletions(-)
---
diff --git a/pitivi/ui/timeline.py b/pitivi/ui/timeline.py
index 32ca228..ece7597 100644
--- a/pitivi/ui/timeline.py
+++ b/pitivi/ui/timeline.py
@@ -264,27 +264,18 @@ class Timeline(gtk.Table, Loggable, Zoomable):
 
         # proportional timeline
         self._canvas = TimelineCanvas(self.app)
-        timelinewindow = gtk.ScrolledWindow(self.hadj, self.vadj)
-        timelinewindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        timelinewindow.add(self._canvas)
-        timelinewindow.set_shadow_type(gtk.SHADOW_IN)
-        timelinewindow.set_name("timelinewindow")
-
-        # temp fix for padding between scrollbar and scrolled window
-        #FIXME: should be set at an global position for easy editing?
-        gtk.rc_parse_string("""
-            style 'timelinewindow'
-            {
-                GtkScrolledWindow::scrollbar-spacing = 0
-            }
-            widget '*.timelinewindow' style 'timelinewindow'
-        """)
-
-        self.attach(timelinewindow, 1, 2, 1, 2)
+        self._root_item = self._canvas.get_root_item()
+        self.attach(self._canvas, 1, 2, 1, 2)
+
+        # scrollbar
+        self._hscrollbar = gtk.HScrollbar(self.hadj)
+        self._vscrollbar = gtk.VScrollbar(self.vadj)
+        self.attach(self._hscrollbar, 1, 2, 2, 3, yoptions=0)
+        self.attach(self._vscrollbar, 2, 3, 1, 2, xoptions=0)
 
         # error infostub
         self.infostub = InfoStub()
-        self.attach(self.infostub, 1, 2, 2, 3, yoptions=0)
+        self.attach(self.infostub, 1, 2, 4, 5, yoptions=0)
 
         self.show_all()
         self.infostub.hide()



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