[pitivi] viewer: Fix rescaling titles



commit 211d7f3893350ec1aaeed5a9eb6a7af20285259b
Author: Thibault Saunier <tsaunier gnome org>
Date:   Fri Oct 23 18:30:31 2015 +0200

    viewer: Fix rescaling titles
    
    Differential Revision: https://phabricator.freedesktop.org/D454

 pitivi/viewer.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 74550ad..fefe536 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -567,8 +567,12 @@ class TransformationBox(Gtk.EventBox, Loggable):
                     width += delta_y
                 else:
                     width += 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))
+                    if isinstance(self.__editSource, GES.VideoUriSource):
+                        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))
+                    else:
+                        wpercent = float(width) / float(self.app.project_manager.current_project.videowidth)
+                        height = int(float(self.app.project_manager.current_project.videoheight) * 
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]