[pitivi] timeline: Request at least the height of a pair of layers for the timeline



commit 7cf9832e7bc7d0f29afcff4e31bd1f74569b6221
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sun Dec 22 06:10:11 2013 +0100

    timeline: Request at least the height of a pair of layers for the timeline

 pitivi/timeline/ruler.py    |    1 +
 pitivi/timeline/timeline.py |    7 ++++---
 pitivi/utils/widgets.py     |    3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/ruler.py b/pitivi/timeline/ruler.py
index b60525e..0a346fd 100644
--- a/pitivi/timeline/ruler.py
+++ b/pitivi/timeline/ruler.py
@@ -104,6 +104,7 @@ class ScaleRuler(Gtk.DrawingArea, Zoomable, Loggable):
         self.connect('configure-event', self.configureEventCb)
         self.callback_id = None
         self.callback_id_scroll = None
+        self.set_size_request(0, 25)
 
     def _focusInCb(self, unused_widget, unused_arg):
         self.log("Ruler has grabbed focus")
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 233467a..2dda803 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -912,6 +912,10 @@ class Timeline(Gtk.VBox, Zoomable, Loggable):
         self.pressed = False
 
         self._packScrollbars(self)
+        min_height = (self.ruler.get_size_request()[1] +
+                      (EXPANDED_SIZE + SPACING) * 2 +
+                      SPACING * 3)
+        self.set_size_request(-1, min_height)
         self.stage.show()
 
     def enableKeyboardAndMouseEvents(self):
@@ -1060,7 +1064,6 @@ class Timeline(Gtk.VBox, Zoomable, Loggable):
         vbox.pack_end(self._hscrollBar, False, True, False)
 
         self.ruler.setProjectFrameRate(24.)
-        self.ruler.set_size_request(0, 25)
         self.ruler.hide()
 
         self.vadj.props.lower = 0
@@ -1071,8 +1074,6 @@ class Timeline(Gtk.VBox, Zoomable, Loggable):
         hbox.pack_start(self._vscrollbar, False, True, False)
         vbox.pack_end(hbox, True, True, True)
 
-        self.zoomBox.set_size_request(CONTROL_WIDTH, -1)
-
         hbox = Gtk.HBox()
         hbox.pack_start(self.zoomBox, False, True, False)
         hbox.pack_start(self.ruler, True, True, True)
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index 489773b..1adfc02 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -42,7 +42,7 @@ from gettext import gettext as _
 from pitivi.utils.loggable import Loggable
 from pitivi.configure import get_ui_dir
 from pitivi.utils.ui import unpack_color, pack_color_32, pack_color_64, \
-    time_to_string, SPACING
+    time_to_string, SPACING, CONTROL_WIDTH
 from pitivi.utils.timeline import Zoomable
 
 ZOOM_FIT = _("Zoom Fit")
@@ -1072,6 +1072,7 @@ class ZoomBox(Gtk.HBox, Zoomable):
         zoomslider.set_size_request(100, 0)  # At least 100px wide for precision
         self.pack_start(zoomslider, True, True, 0)
 
+        self.set_size_request(CONTROL_WIDTH, -1)
         self.show_all()
 
         self._updateZoomSlider = True


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