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 604421 - RTL text aligned wrong within GtkTreeView label with ellipsization on
RTL text aligned wrong within GtkTreeView label with ellipsization on
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2009-12-12 03:50 UTC by Evan Martin (Chromium)
Modified: 2018-02-10 03:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (46.07 KB, image/png)
2009-12-12 03:50 UTC, Evan Martin (Chromium)
Details
file chooser in english (112.72 KB, image/png)
2009-12-13 18:20 UTC, Evan Martin (Chromium)
Details
file chooser in arabic (118.46 KB, image/png)
2009-12-13 18:20 UTC, Evan Martin (Chromium)
Details

Description Evan Martin (Chromium) 2009-12-12 03:50:36 UTC
Created attachment 149622 [details]
screenshot

See the regions outlined in red in the screenshot.  The RTL text is far away from the icon.

More discussion in
http://code.google.com/p/chromium/issues/detail?id=30167
Comment 1 Kristian Rietveld 2009-12-13 13:18:17 UTC
I played a bit with arabic strings in testtreeview with the UI in LTR and RTL mode, and the behavior seems just fine.  The arabic text is not wrongly aligned as in the left window in the screenshot.


Are you perhaps setting the alignment yourself on GtkCellRendererText for RTL language strings?
Comment 2 Evan Martin (Chromium) 2009-12-13 18:19:52 UTC
I looked through the code behind the original screenshot and didn't find any explicit alignment, but it's possible I missed something; the problem also occurs in the normal GtkFileChooser so it seems more likely it's a default somewhere.


Here are some screenshots from a GtkFileChooser in gedit.

Note how in LTR, the rows in different directionalities is far away from each other, but how in RTL, the text in the rows is adjacent.
Comment 3 Evan Martin (Chromium) 2009-12-13 18:20:21 UTC
Created attachment 149642 [details]
file chooser in english
Comment 4 Evan Martin (Chromium) 2009-12-13 18:20:38 UTC
Created attachment 149643 [details]
file chooser in arabic
Comment 5 Kristian Rietveld 2009-12-13 20:40:34 UTC
Aaah, found it now.  It is being caused by the ellipsization property that's turned on in the file chooser (and I guess in the Chromium dialog as well).  testtreeview did not test for this.  IIRC ellipsization mode tries to allocate as much space as possible for the string and in LTR mode the strings are left aligned by default -- which is right aligned for the RTL string.  I think that's why the string is right aligned here.  I am wondering whether this alignment inversion should be turned off in case the UI is still in LTR locale/mode.
Comment 6 Matthias Clasen 2018-02-10 03:35:34 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.