GNOME Bugzilla – Bug 329099
gtk_misc_set_padding fails with labels in RTL locales
Last modified: 2006-02-03 05:39:27 UTC
Please describe the problem: When opening the gedit in RTL locales, the leftmost character of mdi title doesn't show properly. Some part of the leftmost character goes under the close button. Steps to reproduce: 1. in bash type "LANG=fa_IR.UTF-8 gedit" (or use any RTL locale) 2. (If you can not read Persian, open a file now) Actual results: The leftmost character in mdi title goes under the close button. Expected results: It should display the name of the file completely. Does this happen every time? Yes Other information: Also you can see some extra spaces in the right side of the file title in mdi.
Could you please attach a screenshot showing the problem?
Created attachment 58331 [details] Screen shot of mdi title bar. The mdi title should be 'gdm.conf'. The red square shows that the leftmost character goes under the close button and the blue circle shows the extra space in the right of filename.
I've seen a similar problem in epiphany's bookmarks menu [i.e. western text in RTL] (there it's on the right hand, the icon side) when running under a RTL language.
IMHO, it's related to GTK, and maybe the theme engine. Chpe, epiphany uses fixed-width tabs, and yes, it hasn't such a problem.
Created attachment 58405 [details] A short sample code for reproducing bug It seems the bug is related to gtk_misc_set_padding. In RTL locales the label isn't shown where it should be. to reproduce the bug compare the following: $ LC_ALL=en_US.UTF-8 ./sample $ LC_ALL=fa_IR.UTF-8 ./sample
Bug exist in GTK 2.8.6 / GNOME 2.12.1. Would someone check the cvs version please?
I believe the following patch fixes it. Can you test ?
Created attachment 58550 [details] [review] patch
Confirmed.
2006-02-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtklabel.c (get_layout_location): Fix handling of padding in RTL. (#329099, Hooman Mesgary)