Community
Participate
Working Groups
Created attachment 92442 [details] incorrect alignment of caption and text Run Eclipse with Hebrew translation. 1. Install: - Eclipse Base Platform Runtime eclipse-RCP-3.4M5-linux-gtk.tar.gz - NLpackBidi-eclipse-RCP-3.4M5-linux-gtk.zip - Eclipse IDE Platform Runtime eclipse-platform-3.4M5-linux-gtk.tar.gz - NLpackBidi-eclipse-platform-3.4M5-linux-gtk.zip - JDT Runtime eclipse-JDT-3.4M5.zip - NLpackBidi-eclipse-JDT-3.4M5.zip 2. Set default locale to Hebrew 3. Run Eclipse with command line including following argument -nl iw 4. Open Resource perspective. 5. Right click on "Resource" and choose "Customize..." (in Hebrew). 6. Inspect the opened view. Expected result: captions "Submenus:" and "Shortcuts" (in Hebrew) are right aligned, description text is right aligned. Actual result: captions "Submenus:" and "Shortcuts" (in Hebrew) are left aligned, description text is left aligned.
Tod, Don't they need to run with -rtl as well? When I run with -rtl the red-circled captions are right-aligned. PW
We're probably missing a getDefaultOrientation() in the CP dialog. PW
Created attachment 97063 [details] Customize Perpsective dialog On investigation, it appears that the dialog is correct using -nl iw *without* the NL pack, even on 3.4M5. I'll get the NL pack and re-run my tests tomorrow. PW
Created attachment 97211 [details] CP dialog with the NL pack OK, it is incorrect with the bidi NL pack ... does that mean that there are incorrect characters imbedded in the properties file? I'll try and dig them up. PW
ActionSetSelection_availableMenus=&\u05EA\u05EA-\u05EA\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD\: ActionSetSelection_menuItems=\u05E7&\u05D9\u05E6\u05D5\u05E8\u05D9 \u05D3\u05E8\u05DA\:
I've tried removing the chars &, -, and \: and it made no difference. But if I simply change it to ShortCuts, it is right-aligned. Tod, should I send this to SWT? PW
Yes you should.
I think I understand this problem. This happens because on GTK the default paragraph direction is not determine by the presence of SWT.RIGHT_TO_LEFT but by orientation of the first strong characters in the text of the control. Paul, can you try to add '\u200E' as the first character for that label? Something like: ActionSetSelection_availableMenus=\u200E&\u05EA\u05EA-\u05EA\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD\: ActionSetSelection_menuItems=\u200E\u05E7&\u05D9\u05E6\u05D5\u05E8\u05D9 \u05D3\u05E8\u05DA\: Does that fix the problem? Instead of '\u200E' you could use 'a' or whatever latin letter or strong LTR character.
Created attachment 97249 [details] CP dialog with \u200E That corrected the alignment. PW
(In reply to comment #9) > CP dialog with \u200E > That corrected the alignment. Yes, but it broke the reading order, the collon is on the wrong place (before the first char, it should be after the last).
Created attachment 97253 [details] Colon in a wrong place (In reply to comment #10)
I need to know this: Are you use a Label or a READ_ONLY Text widget in the dialog ?
The fields in the CustomizePerspectiveDialog are labels, built like: SashForm sashComposite = new SashForm(menusComposite, SWT.HORIZONTAL); .... Composite menusGroup = new Composite(sashComposite, SWT.NONE); .... label = new Label(menuItemsGroup, SWT.WRAP); label.setText(WorkbenchMessages.ActionSetSelection_menuItems); label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); PW
Remove SWT.WRAP, does that fix the problem ? For example: label = new Label(menuItemsGroup, SWT.NONE); If so, I can say I know what is going on. When WRAP is on GtkLabel sets the width inside its PangoLayout causing it to align the text based in the first strong character in the text. I believe I can write a small c program that shows this problem. This is GTK internals I don't think we can fixed. We would need API from GTK to fix this.
Created attachment 97482 [details] With SWT.NONE instead of SWT.WRAP Without SWT.WRAP the labels look correct to me. PW
(In reply to comment #15) > Without SWT.WRAP the labels look correct to me. Thanks Paul That looks correct to me too.
Under consideration for 3.4. There is a bug in GTK that we are attempting to work around and Felipe tell me it "looks good".
The image attached in comment 15 indeed shows correctly aligned labels.
Fixed in HEAD > 20080505
Still reproducible in integration build I20080517
Created attachment 101062 [details] Customize Perpsective dialog I20080516-1333 I tested RC1 with the M5 NL pack. Is this not the correct alignment? PW
(In reply to comment #20) > Still reproducible in integration build I20080517 Are you testing on a Solaris machine ? or on a 64 bits machine ? What version of GTK are you runnign ? Can you try on Eclipse 3.4 RC1?
I believe Helena was using an internal build to test that was not based on RC1. Closing as WORKSFORME.
*** Bug 226830 has been marked as a duplicate of this bug. ***
Verified in build I20080520-1149
*** Bug 226831 has been marked as a duplicate of this bug. ***