Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 465094 - GVT45:(Bidi) Bad layout and partial GUI is not mirrored after setting "Graphical layout direction" and "Text direction" to "Right to left"
Summary: GVT45:(Bidi) Bad layout and partial GUI is not mirrored after setting "Graphi...
Status: CLOSED DUPLICATE of bug 41474
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-21 05:53 EDT by Baochuan Lin CLA
Modified: 2018-11-30 15:16 EST (History)
7 users (show)

See Also:


Attachments
Bad layout_Prerefence (43.02 KB, image/png)
2015-04-21 05:53 EDT, Baochuan Lin CLA
no flags Details
Debug configuration (104.39 KB, image/png)
2015-04-21 05:53 EDT, Baochuan Lin CLA
no flags Details
Edit field (67.13 KB, image/png)
2015-04-21 05:54 EDT, Baochuan Lin CLA
no flags Details
Wrong display (160.56 KB, image/png)
2015-04-21 05:55 EDT, Baochuan Lin CLA
no flags Details
Wrong icons display on Package Explorer view (71.51 KB, image/png)
2015-04-21 05:57 EDT, Baochuan Lin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Baochuan Lin CLA 2015-04-21 05:53:18 EDT
Created attachment 252572 [details]
Bad layout_Prerefence

Build ID: I20150408-1100
OS:  RHEL 7.1
GTK  Version: gtk2(2.24.22),gtk3(3.8.8)
Steps to reproduce:
      1.Click Windows -> Preference -> General -> Globalization
      2.Set the "Graphical layout direction" and "Text direction" to "Right to left"
      3.Restart the eclipse
      4.Go to the Preference panel, Debug Configuration, Create New Project and Class
     
Problem Description:
After the setting, you could find below issues.
1.Bad layout could found on many panels, such as Preference,Debug Configuration
2.The GUI is partly mirrored
3.The Edit field Text direction didn't change to "RTL"
Please refer to the attachments.
Thanks.
Comment 1 Baochuan Lin CLA 2015-04-21 05:53:51 EDT
Created attachment 252573 [details]
Debug configuration
Comment 2 Baochuan Lin CLA 2015-04-21 05:54:14 EDT
Created attachment 252574 [details]
Edit field
Comment 3 Baochuan Lin CLA 2015-04-21 05:55:32 EDT
Created attachment 252575 [details]
Wrong display
Comment 4 Baochuan Lin CLA 2015-04-21 05:57:02 EDT
Created attachment 252576 [details]
Wrong icons display on Package Explorer view
Comment 5 Tomer Mahlin CLA 2015-04-21 06:32:44 EDT
Several observations: 

1. I wouldn't suggest to focus on Linux platform for Bidi testing. In overwhelming cases customers using Eclipse UI are running on Windows platform. 

2. GUI mirroring ("Graphical layout direction"), should work. You can alternatively run the Eclipse with -nl he or -nl ar or -dir rtl in the command line and see if you get the same results. If you get the same results and display is still not desirable, I would suggest to run the same test on Windows platform.

3. "Text direction" - controls all the contexts for which necessary API was called. Not all contexts should be affected by this property. Obviously all input fields showing plain text (i.e. name of the project) should be controlled. To enforce text direction in graphical control based on the preferences ("Text direction") one should use: org.eclipse.jface.util.BidiUtils as follows:

In general: 
BidiUtils.applyTextDirection(graphicalWidgetOrControl, BidiUtils.BTD_DEFAULT); 

Several concrete examples: 
- org.eclipse.swt.widgets.Text
BidiUtils.applyTextDirection(projectNameField, BidiUtils.BTD_DEFAULT); 

- org.eclipse.swt.widgets.ToolBar
BidiUtils.applyTextDirection(psTB, BidiUtils.BTD_DEFAULT);

- org.eclipse.jface.viewers.CheckboxTableViewer
BidiUtils.applyTextDirection(fTableViewer.getControl(), BidiUtils.BTD_DEFAULT); 

- org.eclipse.jface.viewers.TreeViewer
BidiUtils.applyTextDirection(treeViewer.getControl(), BidiUtils.BTD_DEFAULT); 

- org.eclipse.jface.viewers.CheckboxTableViewer
BidiUtils.applyTextDirection(listViewer.getControl(), BidiUtils.BTD_DEFAULT); 

PS. Passing BidiUtils.BTD_DEFAULT means "take user preferences".
Comment 6 Dani Megert CLA 2015-04-21 08:09:12 EDT
Mandy, can you check whether it looks better on Windows? Thanks.
Comment 7 Baochuan Lin CLA 2015-04-21 08:30:10 EDT
(In reply to Dani Megert from comment #6)
> Mandy, can you check whether it looks better on Windows? Thanks.

Hi Daniel,

On windows, the layout is good and GUI mirror could work on Windows.
Thanks.
Comment 8 Dani Megert CLA 2015-04-24 02:15:05 EDT
Some of the issues are already tracked by older bugs, e.g. bug 41474.
Comment 9 Eric Williams CLA 2018-11-30 15:16:00 EST

*** This bug has been marked as a duplicate of bug 41474 ***