[pitivi] viewer: Fix aspect ratio conservation when resizing video



commit 9915fcd6cdf362d22636b29099d0f6dc68885c32
Author: Thibault Saunier <tsaunier gnome org>
Date:   Fri Sep 25 23:43:58 2015 +0200

    viewer: Fix aspect ratio conservation when resizing video

 pitivi/viewer.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 5a5577a..74550ad 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -567,7 +567,8 @@ class TransformationBox(Gtk.EventBox, Loggable):
                     width += delta_y
                 else:
                     width += delta_y
-                    height += delta_y
+                    wpercent = float(width) / 
float(self.__editSource.get_asset().get_stream_info().get_width())
+                    height = int(float(self.__editSource.get_asset().get_stream_info().get_height()) * 
float(wpercent))
 
                 self.__editSource.set_child_property("width", width)
                 self.__editSource.set_child_property("height", height)


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