Re: Removal of icons in buttons/menus

On 10/09/13 21:58, Jasper St. Pierre wrote:
On Wed, Oct 9, 2013 at 3:49 PM, Olivier Brunel <jjk jjacky com> wrote:

On 10/09/13 21:27, Matthias Clasen wrote:
On Wed, Oct 9, 2013 at 2:09 PM, Erick Pérez Castellanos
<erickpc gnome org>wrote:

People keep raising this issue (both on list and on IRC) and I think
there's a good reason for it.

And people will keep doing it, until they get proper answers.

As an application developer why I found troubling about this particular
removal is:

The setting does not do anything for you as an application developer. It
was a user setting that lets users break the design of your application
making icons pop up in all sorts of places where you did not see them
because you were not testing with that particular combination of user

Nope, not quite. It was an option that let users "break the design of
one's application" (to reuse your wording) by making icons *disappear*
in all sorts of places. Images were *shown* by default, and those
settings allowed users to turn them off, not the other way around.

IOW, what GTK 3.10 did was made sure to "break the design of every GTK
application" and did so while removing the ability to fix it from users.
As for application developers, they had no warning to prepare, and can't
just fix things simply since (a) there's one way to get icons back, but
it involves calling a function on every single widget concerned, and (b)
that is only a temporary fix anyways, to "unbreak" things, since - for
menus at least - said function, like the whole widget, is deprecated.

(Which means, unless I missed something, there is no non-deprecated way
in GTK to have images in menus (except packing a GtkImage ourself in a
GtkMenuItem or similar). Whereas in GIO however, there's still

In GNOME, we turned that setting off by default quite a long time ago.
Probably around 5-6 years at this point. So, if your application relied on
menus and buttons having icons, it would have broken in mid-GNOME2-era

I didn't know this, and thinking about this made me realize something:
it feels to me like this is when a mistake was made.

Because the current GNOME situation (no images in menus) wasn't reached
"properly" since from that moment on you were, in GNOME, having
applications use the GtkImageMenuItem widget, with images set, yet not
displaying them (as you wanted not to show images in menus).

As a result today, we're having this discussion, and also the whole
widget GtkImageMenuItem has been deprecated for no good reason --
because really, having such a widget in GTK (still) makes sense.

If instead you had asked of GNOME devs to not use that widget anymore,
to get rid of images in menus, then today only the getter/setter for
always_show_image would have been deprecated (not the entire widget),
and the removal of the options meant a GtkImageMenuItem would always
show the image. No need to provide a way for devs to still show images
or nothing.

Or: what is the official/recommended (non-deprecated) way for an
application to show images in menus, using GTK?

It remains something that has value/needs to be done. In fact, GIO still
has an API for it. But what's the way to do it in GTK?

Should each app create its own ImageMenuItem widget? What's the reason
for deprecating/eventually removing GtkImageMenuItem?


First: the fact that no-one has explained the reasons behind it.
we can guess the thing has to do with Wayland port but yet there's no
comment in those commits explaining the reasons behind it.

I just did.

Second: The workaround being settings the option in every widget of an
application is not a friendly towards app developers.
Right now, in a moment where new widgets come into Gtk+, the *Getting
Started* section appeared in the docs and there's this new attention to
developer story with Gtk+ (and others), that doesn't seem very friendly

Again, the GtkSettings that we are discussing here do nothing for
application developers. On the contrary, by removing the settings, we
given you as application developer _more_ control over how your
appears to your users.

gtk-devel-list mailing list
gtk-devel-list gnome org

gtk-devel-list mailing list
gtk-devel-list gnome org

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