rpms/gnome-panel/devel more-sharp-icons.patch, NONE, 1.1 gnome-panel.spec, 1.228, 1.229

Matthias Clasen (mclasen) fedora-extras-commits at redhat.com
Sat Oct 13 04:15:12 UTC 2007


Author: mclasen

Update of /cvs/extras/rpms/gnome-panel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17158

Modified Files:
	gnome-panel.spec 
Added Files:
	more-sharp-icons.patch 
Log Message:
More sharp icons


more-sharp-icons.patch:

--- NEW FILE more-sharp-icons.patch ---
diff -up gnome-panel-2.20.0.1/gnome-panel/panel-stock-icons.h.22-24-madness gnome-panel-2.20.0.1/gnome-panel/panel-stock-icons.h
--- gnome-panel-2.20.0.1/gnome-panel/panel-stock-icons.h.22-24-madness	2007-10-13 00:10:23.000000000 -0400
+++ gnome-panel-2.20.0.1/gnome-panel/panel-stock-icons.h	2007-10-13 00:10:39.000000000 -0400
@@ -31,7 +31,7 @@
 G_BEGIN_DECLS
 
 /* themeable size - "panel-menu" */
-#define PANEL_DEFAULT_MENU_ICON_SIZE 	22
+#define PANEL_DEFAULT_MENU_ICON_SIZE 	24
 
 /* stock icons */
 #define PANEL_STOCK_FORCE_QUIT          "gnome-panel-force-quit"
diff -up gnome-panel-2.20.0.1/gnome-panel/menu.c.22-24-madness gnome-panel-2.20.0.1/gnome-panel/menu.c
--- gnome-panel-2.20.0.1/gnome-panel/menu.c.22-24-madness	2007-09-18 09:56:51.000000000 -0400
+++ gnome-panel-2.20.0.1/gnome-panel/menu.c	2007-10-13 00:01:11.000000000 -0400
@@ -385,8 +385,24 @@ panel_make_menu_icon (GtkIconTheme *icon
 	}
 
 	if (pb == NULL) {
-		pb = gdk_pixbuf_new_from_file_at_size (file, size, size, NULL);
-		
+		pb = gdk_pixbuf_new_from_file (file, NULL);
+		if (pb) {
+			gint width, height;
+
+			width = gdk_pixbuf_get_width (pb);
+			height = gdk_pixbuf_get_height (pb);
+			
+			if (!(size - 2 <= width && width <= size &&
+                              size - 2 <= height && height <= size)) {
+				GdkPixbuf *tmp;
+
+				tmp = gdk_pixbuf_scale_simple (pb, size, size, GDK_INTERP_BILINEAR);
+
+				g_object_unref (pb);
+				pb = tmp;
+			}
+		}
+				
 		/* add icon to the hash table so we don't load it again */
 		loaded = TRUE;
 	}
diff -up gnome-panel-2.20.0.1/gnome-panel/panel-stock-icons.c.22-24-madness gnome-panel-2.20.0.1/gnome-panel/panel-stock-icons.c
--- gnome-panel-2.20.0.1/gnome-panel/panel-stock-icons.c.22-24-madness	2007-10-13 00:12:17.000000000 -0400
+++ gnome-panel-2.20.0.1/gnome-panel/panel-stock-icons.c	2007-10-13 00:12:26.000000000 -0400
@@ -128,7 +128,7 @@ panel_init_stock_icons_and_items (void)
 						       PANEL_DEFAULT_MENU_ICON_SIZE,
 						       PANEL_DEFAULT_MENU_ICON_SIZE);
 
-	panel_menu_bar_icon_size = gtk_icon_size_register ("panel-foobar", 20, 20);
+	panel_menu_bar_icon_size = gtk_icon_size_register ("panel-foobar", 24, 24);
 
 	factory = gtk_icon_factory_new ();
 	gtk_icon_factory_add_default (factory);


Index: gnome-panel.spec
===================================================================
RCS file: /cvs/extras/rpms/gnome-panel/devel/gnome-panel.spec,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -r1.228 -r1.229
--- gnome-panel.spec	10 Oct 2007 05:18:51 -0000	1.228
+++ gnome-panel.spec	13 Oct 2007 04:14:37 -0000	1.229
@@ -22,7 +22,7 @@
 Summary: GNOME panel
 Name: gnome-panel
 Version: 2.20.0.1
-Release: 5%{?dist} 
+Release: 6%{?dist} 
 URL: http://www.gnome.org
 Source0: http://download.gnome.org/sources/gnome-panel/2.20/%{name}-%{version}.tar.bz2
 # we are upstream for this
@@ -117,6 +117,9 @@
 # add a hard dependency on e.g. tomboy 
 Patch11: applet-error.patch
 
+# try to deal with the 22/24 madness in icon themes
+Patch12: more-sharp-icons.patch
+
 Conflicts: gnome-power-manager < 2.15.3
 
 %description
@@ -162,6 +165,7 @@
 %patch9 -p1 -b .desktop-file-monitoring
 %patch10 -p1 -b .preferred-apps
 %patch11 -p1 -b .applet-error
+%patch12 -p1 -b .more-sharp-icons
 
 %patch100 -p1 -b .dont-build-clock
 %patch101 -p1 -b .intlclock-build-fixes
@@ -376,6 +380,9 @@
 %{_datadir}/gtk-doc/html/*
 
 %changelog
+* Fri Oct 12 2007 Matthias Clasen <mclasen at redhat.com> - 2.20.0.1-6
+- Sharper icons
+
 * Tue Oct  9 2007 Matthias Clasen <mclasen at redhat.com> - 2.20.0.1-5
 - Some intlclock updates
 




More information about the fedora-extras-commits mailing list