[pitivi] Constrain the viewer to a decent minimum size (where decent == good looking).



commit 888860517ba911a3530c6aac7aedf75dd78c159d
Author: Alessandro Decina <alessandro d gmail com>
Date:   Fri Aug 21 15:59:26 2009 +0200

    Constrain the viewer to a decent minimum size (where decent == good looking).

 pitivi/ui/viewer.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/viewer.py b/pitivi/ui/viewer.py
index c55c001..ac1ad6a 100644
--- a/pitivi/ui/viewer.py
+++ b/pitivi/ui/viewer.py
@@ -263,6 +263,14 @@ class PitiviViewer(gtk.VBox, Loggable):
         bbox.pack_start(self.timelabel, expand=False, padding=10)
         self._haveUI = True
 
+        # show the controls and force the aspect frame to have at least the same
+        # width (+110, which is a magic number to minimize dead padding).
+        bbox.show_all()
+        width, height = bbox.size_request()
+        width += 110
+        height = width / self.aframe.props.ratio
+        self.aframe.set_size_request(width , height)
+
     def showControls(self):
         if not self.action:
             return



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