[gnome-music] Add white and black frames on album art



commit 0c86c716ebeb89a7ffecd1c88bebd7828950fc9f
Author: Seif Lotfy <seif lotfy com>
Date:   Tue May 7 09:34:00 2013 +0200

    Add white and black frames on album art

 src/albumArtCache.js |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/src/albumArtCache.js b/src/albumArtCache.js
index d42553f..51454be 100644
--- a/src/albumArtCache.js
+++ b/src/albumArtCache.js
@@ -126,8 +126,8 @@ const AlbumArtCache = new Lang.Class({
     },
 
     makeIconFrame: function (pixbuf) {
-        var border = 1;
-        var color = 0x0000000044;
+        var border = 3;
+        var color = 0xffffffff;
         var result = GdkPixbuf.Pixbuf.new(pixbuf.get_colorspace(),
                                 true,
                                 pixbuf.get_bits_per_sample(),
@@ -138,6 +138,25 @@ const AlbumArtCache = new Lang.Class({
                         pixbuf.get_width() - (border * 2), pixbuf.get_height() - (border * 2),
                         result,
                         border, border);
+
+        pixbuf = result;
+
+        border = 1;
+        color = 0x00000044;
+        var result2 = GdkPixbuf.Pixbuf.new(pixbuf.get_colorspace(),
+                                true,
+                                pixbuf.get_bits_per_sample(),
+                                pixbuf.get_width(),
+                                pixbuf.get_height());
+        result2.fill(color);
+        pixbuf.copy_area(border, border,
+                        pixbuf.get_width() - (border * 2), pixbuf.get_height() - (border * 2),
+                        result2,
+                        border, border);
+
+        return result2;
+
+
         return result;
     },
 


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