After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 612940 - Please mirror window titles when using a right-to-left language locale
Please mirror window titles when using a right-to-left language locale
Status: RESOLVED OBSOLETE
Product: metacity
Classification: Other
Component: general
trunk
Other Linux
: Normal minor
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2010-03-15 14:11 UTC by Haggai Eran
Modified: 2020-11-06 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Flip the title alignment when using an RTL language (566 bytes, patch)
2010-03-15 21:40 UTC, Haggai Eran
reviewed Details | Review
Effect of this patch on Crux (8.58 KB, image/png)
2010-05-14 20:43 UTC, Thomas Thurman
  Details

Description Haggai Eran 2010-03-15 14:11:16 UTC
Hi,

Some of metacity's themes align the window title to the left. For languages that are written from right to left, such as Hebrew and Arabic, this looks awkward (as if an English title would be aligned to the right).
Usually in gtk, changing the locale to an RTL language locale automatically causes the user interface to be mirrored, and it would be nice if this would also work for metacity's window titles.
Comment 1 Haggai Eran 2010-03-15 21:40:46 UTC
Created attachment 156223 [details] [review]
Flip the title alignment when using an RTL language

Hi again,

I think I worked out a patch to handle this issue. I've attached it below. It recalculates the x offset of the title in the META_DRAW_TITLE case of meta_draw_op_draw_with_env function.

I've used a version of metacity from launchpad for some reason, so I'm not sure if the patch will work on trunk. I'll test that tomorrow perhaps.
Comment 2 Thomas Thurman 2010-05-08 21:36:11 UTC
Review of attachment 156223 [details] [review]:

This seems generally sane, except that there should be a space after "gtk_widget_get_direction".

But can you tell me how I should test it?  I've tried running

  zenity --info --text שלום --title שלום

but it doesn't trigger the gtk_widget_get_direction() check.  Do I have to switch locales entirely, or something?
Comment 3 Haggai Eran 2010-05-09 05:23:21 UTC
‏Yes, the gtk_wdiget_get_direction result is determined by the locale (of metacity).
You can test it by switching metacity's locale, or by switching the locale for metacity-theme-viewer.

Sorry about the space. Do I need to upload a fixed patch?
Comment 4 Thomas Thurman 2010-05-14 20:43:10 UTC
Created attachment 161093 [details]
Effect of this patch on Crux

No, it's okay, I can do that for you at this end.

This patch works fine *if* the design of the titlebar is entirely symmetrical except for the justification of the text.  If you have any sort of asymmetrical design on the titlebar, the results are a bit confusing, as shown in the attached screenshot.  I'm not really sure what to do about this.
Comment 5 Haggai Eran 2010-05-14 23:17:02 UTC
This is a difficult problem. I haven't thought about it before. I'm not sure what to do here either.

First, I think that the best end result would be to have Crux's left and right sections of the title replaced, and its middle part (the image with the little boxes) mirrored. I don't think however that this can be done automatically, because sometimes the graphics mirroring doesn't work.

Perhaps a solution would be to add another attribute to the window tag in the theme, having a different frame style set for right-to-left locales. Something like:
<window type="..." dir="rtl" style_set="..."/>
Then the different style sets could have the alignment changed for the current locale.

For symmetric titlebars as you said, such modifications aren't needed, so I think they should need minimal changes to work in RTL locales - this is why I've sent this patch. On the other hand, I wouldn't want to break current themes like Crux. Perhaps the patch for symmetric titlebars can be enabled somehow only for themes that choose it.
Comment 6 André Klapper 2020-11-06 20:06:26 UTC
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years.

If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/metacity/-/issues/

Thank you for reporting this issue and we are sorry it could not be fixed.