[shotwell] Paint transparent background on thumbnails



commit a001b96928f2c789a93766ada3a24d85b21f0a14
Author: Jens Georg <mail jensge org>
Date:   Sat Apr 22 08:47:13 2017 +0200

    Paint transparent background on thumbnails
    
    Signed-off-by: Jens Georg <mail jensge org>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=716708

 src/CheckerboardLayout.vala |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/CheckerboardLayout.vala b/src/CheckerboardLayout.vala
index 5a672f3..d508617 100644
--- a/src/CheckerboardLayout.vala
+++ b/src/CheckerboardLayout.vala
@@ -563,12 +563,7 @@ public abstract class CheckerboardItem : ThumbnailView {
     }
 
     protected virtual void paint_image(Cairo.Context ctx, Gdk.Pixbuf pixbuf, Gdk.Point origin) {
-        if (pixbuf.get_has_alpha()) {
-            ctx.rectangle(origin.x, origin.y, pixbuf.get_width(), pixbuf.get_height());
-            ctx.fill();
-        }
-        Gdk.cairo_set_source_pixbuf(ctx, pixbuf, origin.x, origin.y);
-        ctx.paint();
+        paint_pixmap_with_background(ctx, pixbuf, origin.x, origin.y);
     }
 
     private int get_selection_border_width(int scale) {
@@ -2015,6 +2010,7 @@ public class CheckerboardLayout : Gtk.DrawingArea {
     }
     
     private void on_colors_changed() {
+        invalidate_transparent_background();
         override_background_color(Gtk.StateFlags.NORMAL, Config.Facade.get_instance().get_bg_color());
         set_colors();
     }


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