Re: Directional Images

On 17/10/13 01:16, Krzysztof Kosiński wrote:

2013/10/17 Jasper St. Pierre <jstpierre mecheye net>:
I think the thing that we'd want is to have a separate RTL icon theme that
inherits from the LTR icon theme, but overrides some icons with flipped
icons. This can be done with a few tweaks to the icon-theme specification,
and in GTK+.

I vaguely recall that once upon a time there were a few stock icons
with an -rtl suffix, which would be used instead of the normal icons
in an RTL environment.

Yes stock items automatically displayed the rtl variant if there was one. With their deprecation the programmer now has to handle that themselves The stock item migration documentation only mentions the ltr names though and doesn't point out that it's the programmers responsibility to handle rtl variants.

This approach could be used with named icons too. When you request
some-icon in an RTL locale, the icon name resolver should first look
for icon-name-rtl, and if that doesn't exist in the theme, use
icon-name. I think this solution is both very simple and adequate.

That would be very useful, unless GTK handles this automatically there are always going to be cases where someone forgets there's an rtl variant that needs to be taken care of. It would also make migrating from stock items much easier.

Best Wishes

Phillip Wood

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