[pitivi] medialibrary: Limit the size of the small thumbnails



commit b68ce73bf3718e011c7cb6c084c26ccac2afae7c
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Wed Oct 5 22:07:15 2016 +0200

    medialibrary: Limit the size of the small thumbnails
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D1357

 pitivi/medialibrary.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 545a044..c07f187 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -246,6 +246,11 @@ class AssetThumbnail(Loggable):
                             LARGE_THUMB_WIDTH,
                             LARGE_THUMB_WIDTH * height / width,
                             GdkPixbuf.InterpType.BILINEAR)
+                        if large_thumb.props.width > SMALL_THUMB_WIDTH:
+                            small_thumb = small_thumb.scale_simple(
+                                SMALL_THUMB_WIDTH,
+                                SMALL_THUMB_WIDTH * height / width,
+                                GdkPixbuf.InterpType.BILINEAR)
         else:
             small_thumb, large_thumb = self.__get_icons("audio-x-generic")
         return small_thumb, large_thumb


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