gnome-applets r10619 - trunk/stickynotes
- From: callum svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-applets r10619 - trunk/stickynotes
- Date: Wed, 6 Feb 2008 09:15:32 +0000 (GMT)
Author: callum
Date: Wed Feb 6 09:15:32 2008
New Revision: 10619
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=10619&view=rev
Log:
Patch to avoid a crash on really small panels (bug #513536)
Modified:
trunk/stickynotes/ChangeLog
trunk/stickynotes/stickynotes_applet.c
Modified: trunk/stickynotes/stickynotes_applet.c
==============================================================================
--- trunk/stickynotes/stickynotes_applet.c (original)
+++ trunk/stickynotes/stickynotes_applet.c Wed Feb 6 09:15:32 2008
@@ -421,16 +421,19 @@
gint size = applet->panel_size;
+ if (size > 3)
+ size = size -3;
+
/* Choose appropriate icon and size it */
if (applet->prelighted)
- pixbuf1 = gdk_pixbuf_scale_simple(stickynotes->icon_prelight, size - 3, size - 3, GDK_INTERP_BILINEAR);
+ pixbuf1 = gdk_pixbuf_scale_simple(stickynotes->icon_prelight, size, size, GDK_INTERP_BILINEAR);
else
- pixbuf1 = gdk_pixbuf_scale_simple(stickynotes->icon_normal, size - 3, size - 3, GDK_INTERP_BILINEAR);
+ pixbuf1 = gdk_pixbuf_scale_simple(stickynotes->icon_normal, size, size, GDK_INTERP_BILINEAR);
/* Shift the icon if pressed */
pixbuf2 = gdk_pixbuf_copy(pixbuf1);
if (applet->pressed)
- gdk_pixbuf_scale(pixbuf1, pixbuf2, 0, 0, size - 3, size - 3, 1, 1, 1, 1, GDK_INTERP_BILINEAR);
+ gdk_pixbuf_scale(pixbuf1, pixbuf2, 0, 0, size, size, 1, 1, 1, 1, GDK_INTERP_BILINEAR);
/* Apply the finished pixbuf to the applet image */
gtk_image_set_from_pixbuf(GTK_IMAGE(applet->w_image), pixbuf2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]