Community
Participate
Working Groups
This can be reproduced on a Linux GTK platform with Eclipse 4.2.2. When a Label SWT control has the SWT.WRAP style, the SWT.RIGHT_TO_LEFT does not have an effect. If you run the following code in eclipse 4.2.2(Juno) you should see that the Text control has the correct RTL orientation, while the Label control, even though it has the SWT.RIGHT_TO_LEFT style applied, still shows LTR: public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display, SWT.DIALOG_TRIM | SWT.RIGHT_TO_LEFT); shell.setSize(500, 500); Label l = new Label(shell, SWT.BORDER | SWT.WRAP | SWT.RIGHT_TO_LEFT); l.setText("\u05d4\u05d2\u05d9\u05e8\u05d4 \u05e9\u05dc \u05e0\u05ea\u05d5\u05e0\u05d9\u05dd"); l.setBounds(10,10,300,30); Text t = new Text(shell, SWT.BORDER | SWT.WRAP); t.setText("\u05d4\u05d2\u05d9\u05e8\u05d4 \u05e9\u05dc \u05e0\u05ea\u05d5\u05e0\u05d9\u05dd"); t.setBounds(10,50,300,30); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }
Hi Lina, looks like Linux specific issue, but still a very ugly one :-)). I wonder if it is reproducible on Windows ?
I am able to reproduce this in Neon also
(In reply to Tomer Mahlin from comment #1) > Hi Lina, looks like Linux specific issue, but still a very ugly one :-)). I > wonder if it is reproducible on Windows ? Hi Tomer, this is not reproducible on Windows. BTW, based on the content the testcase uses ("\u05d4\u05d2\u05d9\u05e8\u05d4 \u05e9\u05dc \u05e0\u05ea\u05d5\u05e0\u05d9\u05dd") it's impossible to say whether the problem base direction, alignment, or both. Taking this bug for investigation.
Created attachment 259162 [details] Screenshot - not repro in 4.3 I tried this on my old RedHat machine having Eclipse Kepler (4.3), and the problem is not reproducible. So this looks like a regression.
Of course, this can be coming from GTK; that machine has GTK2. Peter: could you please let me know your GTK level. Thank you.
Hi Sravan, which GTK+ version are you running on? Thank you.
Here is a slightly modified example: public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display, SWT.DIALOG_TRIM | SWT.RIGHT_TO_LEFT); shell.setSize(500, 500); Label l = new Label(shell, SWT.BORDER | SWT.WRAP | SWT.RIGHT_TO_LEFT); l.setText("abc \u05d4\u05d2\u05d9\u05e8\u05d4 \u05e9\u05dc \u05e0\u05ea\u05d5\u05e0\u05d9\u05dd..."); l.setBounds(10,10,300,30); l.setAlignment(SWT.LEFT); l = new Label(shell, SWT.BORDER | SWT.WRAP | SWT.RIGHT_TO_LEFT); l.setText("abc \u05d4\u05d2\u05d9\u05e8\u05d4 \u05e9\u05dc \u05e0\u05ea\u05d5\u05e0\u05d9\u05dd..."); l.setBounds(10,50,300,30); l.setAlignment(SWT.RIGHT); Text t = new Text(shell, SWT.BORDER | SWT.WRAP); t.setText("abc \u05d4\u05d2\u05d9\u05e8\u05d4 \u05e9\u05dc \u05e0\u05ea\u05d5\u05e0\u05d9\u05dd..."); t.setBounds(10,90,300,30); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } It has a few diifs with that in Comment 0: (1) text content is different to have a clear indication what base direction a control applies. - If it is LTR, the text will be displayed as "abc HEBREW..." - If it is RTL, the text will be displayed as "...HEBREW abc" (2) There is an additional Label control (3) We set an explicit alignment on each Label - SWT#LEFT and SWT#RIGHT respectively. Could someone try this on GTK3 and share the screen cap please? (It looks like my system cannot upgrade its GTK to level 3, and setting up a new machine may take a while.)
Ping! We cannot reproduce this on GTK+ 3 either.
What is the machine / application locale this is reproducible on?
Hi Lina, as described in the description, this is reproducible with Eclipse 4.2.2. I cannot reproduce with say Eclipse 4.5.1. I need to know when was this issue fixed so the fix could be potentially back-ported, is there a bugzilla that fixes this? In what version of Eclipse was the fix delivered? Thanks!
(In reply to Peter Parapounsky from comment #10) > Hi Lina, as described in the description, this is reproducible with Eclipse > 4.2.2. I cannot reproduce with say Eclipse 4.5.1. I need to know when was > this issue fixed so the fix could be potentially back-ported, is there a > bugzilla that fixes this? In what version of Eclipse was the fix delivered? > Thanks! Hi Peter, as stated in Comment 4, the problem is not reproducible with Eclipse 4.3 (but Comment 2 says it is reproducible with 4.6). I'll try to figure out what the problem in 4.2.2 (and 4.6?) is. It would be still very helpful if you could indicate your Linux distro, GTK version, machine/app locale please. Thank you!
Hi Lina, I can reproduce on Redhat 7 and Ubuntu 14.04 and 15.04.
Well, I can't reproduce this with 4.2.2 either. Peter, could you please run the example given in Comment 7 and share your screen shot? - I hope that would help us track down the problem. Thank you.
I cannot reproduce the issue on SWT from master as of today, GTK3.24, and Fedora 29.