don't request toggle_space when the image width is 0.

Sat Jul 26 15:21:27 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkimagemenuitem.c
	(gtk_image_menu_item_toggle_size_request): don't request
	toggle_space when the image width is 0.
This commit is contained in:
Soeren Sandmann 2003-07-26 13:22:42 +00:00 committed by Søren Sandmann Pedersen
parent 63f745738d
commit c9714692aa
6 changed files with 42 additions and 8 deletions

View File

@ -1,3 +1,9 @@
Sat Jul 26 15:21:27 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkimagemenuitem.c
(gtk_image_menu_item_toggle_size_request): don't request
toggle_space when the image width is 0.
2003-07-25 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkprivate-win32.h

View File

@ -1,3 +1,9 @@
Sat Jul 26 15:21:27 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkimagemenuitem.c
(gtk_image_menu_item_toggle_size_request): don't request
toggle_space when the image width is 0.
2003-07-25 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkprivate-win32.h

View File

@ -1,3 +1,9 @@
Sat Jul 26 15:21:27 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkimagemenuitem.c
(gtk_image_menu_item_toggle_size_request): don't request
toggle_space when the image width is 0.
2003-07-25 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkprivate-win32.h

View File

@ -1,3 +1,9 @@
Sat Jul 26 15:21:27 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkimagemenuitem.c
(gtk_image_menu_item_toggle_size_request): don't request
toggle_space when the image width is 0.
2003-07-25 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkprivate-win32.h

View File

@ -1,3 +1,9 @@
Sat Jul 26 15:21:27 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkimagemenuitem.c
(gtk_image_menu_item_toggle_size_request): don't request
toggle_space when the image width is 0.
2003-07-25 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkprivate-win32.h

View File

@ -184,18 +184,22 @@ gtk_image_menu_item_toggle_size_request (GtkMenuItem *menu_item,
{
GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (menu_item);
*requisition = 0;
if (image_menu_item->image)
{
guint toggle_spacing;
guint image_width = image_menu_item->image->requisition.width;
gtk_widget_style_get (GTK_WIDGET (menu_item),
"toggle_spacing", &toggle_spacing,
NULL);
*requisition = image_menu_item->image->requisition.width + toggle_spacing;
if (image_width > 0)
{
guint toggle_spacing;
gtk_widget_style_get (GTK_WIDGET (menu_item),
"toggle_spacing", &toggle_spacing,
NULL);
*requisition = image_width + toggle_spacing;
}
}
else
*requisition = 0;
}