Re: GtkImage insensitive rendering



Havoc Pennington <hp redhat com> writes:

> Patch for:
>   http://bugzilla.gnome.org/show_bug.cgi?id=63305

I've committed your patch now.
 
> There are two problems in here. 
> 
> One is that we drop the mask for pixmap/image GtkImages; this could be
> resolved by making gdk_pixbuf_render_to_drawable() render alpha
> channel as proposed earlier.

Done.

> Two is that gtk_style_render_icon() wants an icon size; we sort of
> need a magic "do not scale" argument to be passed in instead. 
> Would it be too horrible if passing -1 to this resulted in not
> scaling? 

I don't think it's too bad, and seems more robust than the alternatives.
I've done this.

> Then we could also remove the logic that decides whether to
> scale from default_render_icon and move it to gtkiconfactory.c

I haven't done this yet.
 
> The patch is a bit slow, since it doesn't cache anything, but I'm not
> sure we _can_ cache anything since we don't know when a pixmap/pixbuf
> changes. So people that want caching should maybe use GtkIconSet, or
> ideally register all their app's icons with the stock system.

I fixed the _huge_ slowness of the patch, which was that it always
created the entire insensitive image when just rendering a small part.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]