gnome-applets r11165 - in trunk/trashapplet: . src
- From: ryanl svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-applets r11165 - in trunk/trashapplet: . src
- Date: Sun, 21 Dec 2008 20:14:43 +0000 (UTC)
Author: ryanl
Date: Sun Dec 21 20:14:43 2008
New Revision: 11165
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=11165&view=rev
Log:
2008-12-21 Ryan Lortie <desrt desrt ca>
Bug 564413 â Icon does not scale like launchers do
* src/trashapplet.c (trash_applet_size_allocate): set the size of the
icon in the same way that the panel does for launchers.
Modified:
trunk/trashapplet/ChangeLog
trunk/trashapplet/src/trashapplet.c
Modified: trunk/trashapplet/src/trashapplet.c
==============================================================================
--- trunk/trashapplet/src/trashapplet.c (original)
+++ trunk/trashapplet/src/trashapplet.c Sun Dec 21 20:14:43 2008
@@ -151,6 +151,26 @@
}
static void
+trash_applet_set_icon_size (TrashApplet *applet,
+ gint size)
+{
+ /* copied from button-widget.c in the panel */
+ if (size < 22)
+ size = 16;
+ else if (size < 24)
+ size = 22;
+ else if (size < 32)
+ size = 24;
+ else if (size < 48)
+ size = 32;
+ else
+ size = 48;
+
+ /* GtkImage already contains a check to do nothing if it's the same */
+ gtk_image_set_pixel_size (applet->image, size);
+}
+
+static void
trash_applet_size_allocate (GtkWidget *widget,
GdkRectangle *allocation)
{
@@ -160,12 +180,12 @@
{
case PANEL_APPLET_ORIENT_LEFT:
case PANEL_APPLET_ORIENT_RIGHT:
- gtk_image_set_pixel_size (applet->image, allocation->width - 2);
+ trash_applet_set_icon_size (applet, allocation->width);
break;
case PANEL_APPLET_ORIENT_UP:
case PANEL_APPLET_ORIENT_DOWN:
- gtk_image_set_pixel_size (applet->image, allocation->height - 2);
+ trash_applet_set_icon_size (applet, allocation->height);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]