Re: GTK_STOCK icons vs. named spec
- From: Christian Dywan <christian imendio com>
- To: gtk-devel-list gnome org
- Subject: Re: GTK_STOCK icons vs. named spec
- Date: Mon, 17 Nov 2008 14:42:03 +0100
Am Thu, 13 Nov 2008 21:56:29 -0800
schrieb John Daiker <daikerjohn gmail com>:
> Hello All,
>
> First off, apologies for the widespread distribution of this e-mail.
> I figure start big, and then the appropriate list can assist from
> there.
>
> Second, I just signed up to the list (gtk-app-devel-list), but had a
> specific question about using the GTK_STOCK_* naming convention
> versus the 'defined text'. (eg: GTK_STOCK_SAVE vs 'gtk-save' and
> GTK_STOCK_CLOSE vs 'gtk-close')
> Rhythmbox currently uses the GTK_STOCK_* convention, but it has been
> brought up recently
> (http://bugzilla.gnome.org/show_bug.cgi?id=560349#c5) that perhaps
> this convention is 'bad habit'.
>
> Just looking for some insight into this, and maybe to get a feel for
> what the community views as the 'best practice'.
Hey John,
if the question is whether to use a stock ID or a named icon, there are
a few points to regard:
- A stock ID can refer to multiple icon names
- A stock icon is guaranteed to exist (exception: GTK_STOCK_DISCARD)
- A stock ID can and usually does include a label
- A stock icon can have an RTL variant
Basically you can use an icon name wherever you need no icon, and of
course you *should* use an icon name where there is no stock ID.
However at the same time, your must be aware that unless you ship the
icon with your application, that without a theme containing the icon
name your application is basically broken.
ciao,
Christian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]