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 329099 - gtk_misc_set_padding fails with labels in RTL locales
gtk_misc_set_padding fails with labels in RTL locales
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.8.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: Persian
 
 
Reported: 2006-01-29 16:55 UTC by Hooman "Messi" Mesgary
Modified: 2006-02-03 05:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Screen shot of mdi title bar. (36.44 KB, image/png)
2006-01-29 17:19 UTC, Hooman "Messi" Mesgary
  Details
A short sample code for reproducing bug (582 bytes, text/plain)
2006-01-30 16:38 UTC, Hooman "Messi" Mesgary
  Details
patch (695 bytes, patch)
2006-02-01 21:44 UTC, Matthias Clasen
none Details | Review

Description Hooman "Messi" Mesgary 2006-01-29 16:55:59 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.
Comment 1 Paolo Maggi 2006-01-29 17:02:11 UTC
Could you please attach a screenshot showing the problem?
Comment 2 Hooman "Messi" Mesgary 2006-01-29 17:19:41 UTC
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.
Comment 3 Christian Persch 2006-01-29 23:24:53 UTC
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.
Comment 4 Behnam Esfahbod 2006-01-29 23:48:18 UTC
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.
Comment 5 Hooman "Messi" Mesgary 2006-01-30 16:38:50 UTC
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
Comment 6 Behnam Esfahbod 2006-01-30 17:14:59 UTC
Bug exist in GTK 2.8.6 / GNOME 2.12.1.

Would someone check the cvs version please?
Comment 7 Matthias Clasen 2006-02-01 21:44:20 UTC
I believe the following patch fixes it. 
Can you test ?
Comment 8 Matthias Clasen 2006-02-01 21:44:50 UTC
Created attachment 58550 [details] [review]
patch
Comment 9 Behdad Esfahbod 2006-02-02 00:58:15 UTC
Confirmed.
Comment 10 Matthias Clasen 2006-02-03 05:39:27 UTC
2006-02-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtklabel.c (get_layout_location): Fix handling
        of padding in RTL.  (#329099, Hooman Mesgary)