Re: Using symbolic icons in extensions



On Fri, May 4, 2012 at 7:24 AM, Tim Cuthbertson <tim gfxmonk net> wrote:
> I've been trying to figure this out for a while, and it seems like it
> can't be done.
>
> 1) I have got symbolic icons working in a shell extension panel
> button, but *only* by setting the icon_name property on a St.Icon,
> which requires icons be installed in a system location.
>
> 2) If I want to use an icon contained in my extension's folder, I have
> to create a GIcon based on that path, and then assign it to the
> St.Icon's `gicon` property.
>
> It seems I can't have both. Am I missing something? There doesn't seem
> to be a way to construct a symbolic FileIcon, nor a way to
> programmatically add my extension's icon location to the system icon
> lookup-by-name mechanism. Surely it must be possible, can anyone help?

A symbolic icon isn't anything magical. It's just an SVG with
replaceable colors. If you use St.Icon with a FileIcon, it should just
work, assuming the file exists. All St.IconType.SYMBOLIC will try to
do will be to append '-symbolic' to parts of the icon. We should
probably scrap that code at some point - it was put in so we would
have full-color fallbacks when not all of the symbolic icons were
created yet, and those days are long gone :)

> Cheers,
>  - Tim.
> _______________________________________________
> gnome-shell-list mailing list
> gnome-shell-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-shell-list



-- 
  Jasper


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