Comment 3 for bug 668375

Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 668375] Re: Allow specifying a full path to an icon, not just an icon from the theme

On Tue, 2010-11-02 at 15:22 +0000, Rick Spencer wrote:
> There is a way to do this easily, right? If I'm right, could you please
> pop in a couple lines of sample code and close this out? Thanks.

Well, yes and no. If you set your icon to something that starts with a
'/' it will show that icon. But, we don't want to encourage that, so
the API specifically says that it isn't possible. I also didn't have a
test for it, but I just wrote one to ensure that it works.

What we instead would like to encourage is for people to start thinking
like icon themes. The reason for this is that it allows for multiple
sizes and theming of the panel separate from applications. So, for
instance, an application could be themed with a light background (thus
needing dark icons) and the panel could have a dark background (needing
light icons). The application shouldn't have to know about this. And
by using icon naming this problem is solvable on the panel side of
things.

For the Natty cycle we also want to provide a convenience API to provide
for building a custom icon theme for people who want to generate icons.
This doesn't solve all of the theming problems, but it does make it
possible to solve the multiple sizes one.

I'm going to leave this bug open as a marker for needing that API to get
completed and landed, though technically you could use a path to specify
the icon.