[gnome-panel] xstuff: fix cropped pixbuf rendering during zoom animation



commit eb465004e71366564f74107f2b3173f273904836
Author: Yannick Gicquel <ygicquel gmail com>
Date:   Sat Sep 10 13:56:14 2016 +0200

    xstuff: fix cropped pixbuf rendering during zoom animation
    
    This patch fixes the zoom range for the launcher zoom animation.
    
    The destination popup window size is computed based on the width
    and height of widget allocation * ZOOM_FACTOR, while the zoom range is
    based on width only. When width is higher than height, the zoomed icon
    does not fit in the destination popup window and is cropped.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771166
    
    Signed-off-by: Yannick Gicquel <ygicquel gmail com>

 gnome-panel/xstuff.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnome-panel/xstuff.c b/gnome-panel/xstuff.c
index a10dc35..c0275a5 100644
--- a/gnome-panel/xstuff.c
+++ b/gnome-panel/xstuff.c
@@ -155,9 +155,9 @@ draw_zoom_animation_composited (GdkScreen *gscreen,
        h += 2;
 
        zoom = g_slice_new (CompositedZoomData);
-       zoom->size = w;
-       zoom->size_start = w;
-       zoom->size_end = w * ZOOM_FACTOR;
+       zoom->size = MIN (w,h);
+       zoom->size_start = zoom->size;
+       zoom->size_end = zoom->size * ZOOM_FACTOR;
        zoom->orientation = orientation;
        zoom->opacity = 1.0;
        zoom->pixbuf = g_object_ref (pixbuf);


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