status_icon->priv = priv;
priv->icon_helper = _gtk_icon_helper_new ();
+ _gtk_icon_helper_set_force_scale_pixbuf (priv->icon_helper, TRUE);
priv->visible = TRUE;
#ifdef GDK_WINDOWING_X11
#endif
GtkStyleContext *context;
GtkWidget *widget;
- GtkImageType storage_type = _gtk_icon_helper_get_storage_type (priv->icon_helper);
GdkPixbuf *pixbuf;
gint round_size;
context = gtk_widget_get_style_context (widget);
round_size = round_pixel_size (widget, priv->size);
- if (storage_type == GTK_IMAGE_PIXBUF)
- {
- GdkPixbuf *scaled;
- gint width;
- gint height;
-
- pixbuf = _gtk_icon_helper_ensure_pixbuf (priv->icon_helper, context);
-
- width = gdk_pixbuf_get_width (pixbuf);
- height = gdk_pixbuf_get_height (pixbuf);
-
- if (width > round_size || height > round_size)
- {
- scaled = gdk_pixbuf_scale_simple (pixbuf,
- MIN (round_size, width),
- MIN (round_size, height),
- GDK_INTERP_BILINEAR);
- g_object_unref (pixbuf);
- pixbuf = scaled;
- }
- }
- else
- {
- _gtk_icon_helper_set_pixel_size (priv->icon_helper, round_size);
- pixbuf = _gtk_icon_helper_ensure_pixbuf (priv->icon_helper, context);
- }
+ _gtk_icon_helper_set_pixel_size (priv->icon_helper, round_size);
+ pixbuf = _gtk_icon_helper_ensure_pixbuf (priv->icon_helper, context);
if (pixbuf != NULL)
{