[gnome-photos/wip/rishi/thumbnailer: 4/13] utils: Don't border the placeholder icons



commit cce7702a4cddfd33118e71f0390376035b715eaa
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Feb 21 19:32:01 2017 +0100

    utils: Don't border the placeholder icons
    
    It doesn't look nice with the letterboxed thumbnail grid.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777869

 src/photos-utils.c |   46 ----------------------------------------------
 src/photos-utils.h |    3 ---
 2 files changed, 0 insertions(+), 49 deletions(-)
---
diff --git a/src/photos-utils.c b/src/photos-utils.c
index d514288..bd05cfb 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -23,7 +23,6 @@
  *   + Documents
  *   + Eye of GNOME
  *   + Shotwell
- *   + Totem
  */
 
 
@@ -83,50 +82,6 @@ enum
 };
 
 
-static void
-photos_utils_put_pixel (guchar *p)
-{
-  p[0] = 46;
-  p[1] = 52;
-  p[2] = 54;
-  p[3] = 0xff;
-}
-
-
-void
-photos_utils_border_pixbuf (GdkPixbuf *pixbuf)
-{
-  gint height;
-  gint width;
-  gint rowstride;
-  gint x;
-  gint y;
-  guchar *pixels;
-
-  height = gdk_pixbuf_get_height (pixbuf);
-  width = gdk_pixbuf_get_width (pixbuf);
-
-  pixels = gdk_pixbuf_get_pixels (pixbuf);
-  rowstride = gdk_pixbuf_get_rowstride (pixbuf);
-
-  /* top */
-  for (x = 0; x < width; x++)
-    photos_utils_put_pixel (pixels + x * 4);
-
-  /* bottom */
-  for (x = 0; x < width; x++)
-    photos_utils_put_pixel (pixels + (height - 1) * rowstride + x * 4);
-
-  /* left */
-  for (y = 1; y < height - 1; y++)
-    photos_utils_put_pixel (pixels + y * rowstride);
-
-  /* right */
-  for (y = 1; y < height - 1; y++)
-    photos_utils_put_pixel (pixels + y * rowstride + (width - 1) * 4);
-}
-
-
 GdkPixbuf *
 photos_utils_center_pixbuf (GdkPixbuf *pixbuf, gint size)
 {
@@ -315,7 +270,6 @@ photos_utils_create_placeholder_icon_for_scale (const gchar *name, gint size, gi
 
   size_scaled = size * scale;
   centered_pixbuf = photos_utils_center_pixbuf (pixbuf, size_scaled);
-  photos_utils_border_pixbuf (centered_pixbuf);
 
   ret_val = centered_pixbuf;
   centered_pixbuf = NULL;
diff --git a/src/photos-utils.h b/src/photos-utils.h
index e811088..7ef2f2b 100644
--- a/src/photos-utils.h
+++ b/src/photos-utils.h
@@ -22,7 +22,6 @@
  *   + Documents
  *   + Eye of GNOME
  *   + Shotwell
- *   + Totem
  */
 
 #ifndef PHOTOS_UTILS_H
@@ -53,8 +52,6 @@ G_BEGIN_DECLS
   "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#image-category-screenshot";
 #define PHOTOS_EXPORT_SUBPATH "Exports"
 
-void             photos_utils_border_pixbuf               (GdkPixbuf *pixbuf);
-
 GdkPixbuf       *photos_utils_center_pixbuf               (GdkPixbuf *pixbuf, gint size);
 
 gchar           *photos_utils_convert_path_to_uri         (const gchar *path);


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