[gnome-contacts] 48x48 icons



commit c00c0c7ec31dcacaa0cbd82661fb5003c9e7aa7a
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Jun 7 16:04:31 2011 +0200

    48x48 icons

 src/contacts-contact.vala |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index d630b9e..08e71a4 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -249,7 +249,7 @@ public class Contacts.Contact : GLib.Object  {
       try {
 	var stream = file.read ();
 	Cancellable c = new Cancellable ();
-	res = new Gdk.Pixbuf.from_stream_at_scale (stream, 44, 44, true, c);
+	res = new Gdk.Pixbuf.from_stream_at_scale (stream, 48, 48, true, c);
       } catch (Error e) {
       }
     }
@@ -269,33 +269,33 @@ public class Contacts.Contact : GLib.Object  {
   }
 
   private static Gdk.Pixbuf frame_icon (Gdk.Pixbuf icon) {
-    var cst = new Cairo.ImageSurface (Cairo.Format.ARGB32, 48, 48);
+    var cst = new Cairo.ImageSurface (Cairo.Format.ARGB32, 52, 52);
     var cr = new Cairo.Context (cst);
 
     cr.set_source_rgba (0, 0, 0, 0);
-    cr.rectangle (0, 0, 48, 48);
+    cr.rectangle (0, 0, 52, 52);
     cr.fill ();
 
-    round_rect (cr, 0, 0, 48, 48, 5);
+    round_rect (cr, 0, 0, 52, 52, 5);
     cr.set_source_rgb (0.74117, 0.74117, 0.74117);
     cr.fill ();
 
-    round_rect (cr, 1, 1, 46, 46, 5);
+    round_rect (cr, 1, 1, 50, 50, 5);
     cr.set_source_rgb (1, 1, 1);
     cr.fill ();
 
     Gdk.cairo_set_source_pixbuf (cr, icon, 2, 2);
     cr.paint();
 
-    return Gdk.pixbuf_get_from_surface (cst, 0, 0, 48, 48);
+    return Gdk.pixbuf_get_from_surface (cst, 0, 0, 52, 52);
   }
 
   private static Gdk.Pixbuf draw_fallback_avatar () {
-    var cst = new Cairo.ImageSurface (Cairo.Format.ARGB32, 44, 44);
+    var cst = new Cairo.ImageSurface (Cairo.Format.ARGB32, 48, 48);
     var cr = new Cairo.Context (cst);
 
     try {
-      var icon_info = IconTheme.get_default ().lookup_icon ("avatar-default", 44, IconLookupFlags.GENERIC_FALLBACK);
+      var icon_info = IconTheme.get_default ().lookup_icon ("avatar-default", 48, IconLookupFlags.GENERIC_FALLBACK);
       var image = icon_info.load_icon ();
       if (image != null) {
 	Gdk.cairo_set_source_pixbuf (cr, image, 0, 0);
@@ -304,6 +304,6 @@ public class Contacts.Contact : GLib.Object  {
     } catch {
     }
 
-    return Gdk.pixbuf_get_from_surface (cst, 0, 0, 44, 44);
+    return Gdk.pixbuf_get_from_surface (cst, 0, 0, 48, 48);
   }
 }



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