image: use the default icon size if no icon size is provided

If no icon size is provided (e.g. when setting icon-name or stock-id
using the GObject property directly), use the default icon size. This
matches the previous GtkImage behavior.
This commit is contained in:
Cosimo Cecchi 2011-11-30 19:46:31 -05:00
parent 0c68227270
commit 58b1f24d6d

View File

@ -380,6 +380,9 @@ gtk_image_set_property (GObject *object,
GtkImagePrivate *priv = image->priv;
GtkIconSize icon_size = _gtk_icon_helper_get_icon_size (priv->icon_helper);
if (icon_size == GTK_ICON_SIZE_INVALID)
icon_size = DEFAULT_ICON_SIZE;
switch (prop_id)
{
case PROP_PIXBUF: