[pitivi/ges: 125/287] ui/viewer: Correctly set a default aspect ratio on startup



commit 1f1299579659af4a4d26d65a616a0fb2b172457d
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Sat Dec 31 12:55:23 2011 -0500

    ui/viewer: Correctly set a default aspect ratio on startup

 pitivi/ui/viewer.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/ui/viewer.py b/pitivi/ui/viewer.py
index e61de24..0670ef0 100644
--- a/pitivi/ui/viewer.py
+++ b/pitivi/ui/viewer.py
@@ -206,7 +206,7 @@ class PitiviViewer(gtk.VBox, Loggable):
         self.debug("action: %r", action)
         # not sure what we need to do ...
         self.action = action
-        dar = float(4 / 3)
+        dar = 16.0 / 9
         try:
             producer = action.producers[0]
             self.debug("producer:%r", producer)
@@ -218,7 +218,7 @@ class PitiviViewer(gtk.VBox, Loggable):
                     dar = stream.dar
                     continue
         except:
-            dar = float(4 / 3)
+            self.debug("Could not get the stream's aspect ratio")
         self.setDisplayAspectRatio(dar)
         self.showControls()
 
@@ -251,7 +251,8 @@ class PitiviViewer(gtk.VBox, Loggable):
 
     def _createUi(self):
         """ Creates the Viewer GUI """
-        # drawing area
+        # Drawing area
+        # The aspect ratio gets overridden on startup by setDisplayAspectRatio
         self.aframe = gtk.AspectFrame(xalign=0.5, yalign=1.0, ratio=4.0 / 3.0,
                                       obey_child=False)
 



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