Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333130 - [BiDi] SLED11+SP1, the messagedialog UI incorrect with RTL, the message should use right alignment.
Summary: [BiDi] SLED11+SP1, the messagedialog UI incorrect with RTL, the message shoul...
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2010-12-23 01:07 EST by yanghang CLA
Modified: 2018-11-30 10:46 EST (History)
9 users (show)

See Also:


Attachments
sample code (2.00 KB, text/x-java-source)
2010-12-23 01:10 EST, yanghang CLA
no flags Details
screen shot (21.25 KB, image/jpeg)
2010-12-23 01:10 EST, yanghang CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description yanghang CLA 2010-12-23 01:07:22 EST
Build Identifier: JFace 3.4.2

SLED11+SP1, the messagedialog UI incorrect with RTL, the message should use right alignment.

Reproducible: Always

Steps to Reproduce:
1. run my sample
2: click any buttons, will show message dialog.

Bug:

The message should use right alignment.
Comment 1 yanghang CLA 2010-12-23 01:10:29 EST
Created attachment 185745 [details]
sample code
Comment 2 yanghang CLA 2010-12-23 01:10:54 EST
Created attachment 185746 [details]
screen shot
Comment 3 Felipe Heidrich CLA 2010-12-23 09:11:56 EST
is the problem on Linux or Windows ?
Comment 4 yanghang CLA 2010-12-26 20:57:40 EST
It is only reproduced on SLED11+SP1(Suse11+ SP1)
Comment 5 Felipe Heidrich CLA 2011-01-04 15:29:44 EST
(In reply to comment #4)
> It is only reproduced on SLED11+SP1(Suse11+ SP1)

Don't you see the same problem on windows ?

That MessageDialog is provided by JFace, moving to UI.
Comment 6 yanghang CLA 2011-01-17 21:01:35 EST
(In reply to comment #5)
> (In reply to comment #4)
> > It is only reproduced on SLED11+SP1(Suse11+ SP1)
> 
> Don't you see the same problem on windows ?
> 
> That MessageDialog is provided by JFace, moving to UI.

it only reproduce on SLED11+SP1(Suse11+ SP1), not reproduce this on windows
Comment 7 Felipe Heidrich CLA 2011-01-18 15:25:41 EST
Snippet:
public class PR333130 {
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, 375);
	shell.setLayout(new GridLayout());
	final Label l = new Label(shell, SWT.WRAP);
	l.setText("\u0646\u0635 \u0627\u0644\u062A\u0631\u0634\u064A\u062D");
	l.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 0, 0));
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}
	display.dispose();
}
}

*** This bug has been marked as a duplicate of bug 41474 ***
Comment 8 Felipe Heidrich CLA 2011-01-18 15:27:53 EST
Sorry, bug 41474 uses a Text. This bug is on a Label.
Comment 9 Mohamed El-Kholy CLA 2011-02-17 07:14:39 EST
What is the GTK version on the platform reporting the  bug ?
Comment 10 Felipe Heidrich CLA 2011-02-17 09:48:06 EST
(In reply to comment #9)
> What is the GTK version on the platform reporting the  bug ?

I believe any version of GTK will do.
Did you try the snippet I posted ? Does it work for you ?
Comment 11 Mohamed El-Kholy CLA 2011-02-20 03:29:57 EST
(In reply to comment #10)
> (In reply to comment #9)
> > What is the GTK version on the platform reporting the  bug ?
> 
> I believe any version of GTK will do.
> Did you try the snippet I posted ? Does it work for you ?

I tried it on RHEL , it worked without problems , that is why I am asking about GTK version, I don't have a Suse Linux environment right now , but I may try Ubuntu if it will help
Comment 12 Felipe Heidrich CLA 2011-02-22 12:49:31 EST
(In reply to comment #11)
> I tried it on RHEL , it worked without problems , that is why I am asking about
> GTK version, I don't have a Suse Linux environment right now , but I may try
> Ubuntu if it will help

Did you try the snippet in comment 7 ?
In which side what that text aligned ?
Comment 13 Felipe Heidrich CLA 2011-02-24 11:10:41 EST
It fails for me on GTK 2.16.6
The text in the label should be aligned on the right edge but instead it shows on the left edge. Remove the SWT.WRAP from the Label and it will work as expected.
Comment 14 Mohamed El-Kholy CLA 2011-03-27 10:00:13 EDT
the red hat machine I am working on is not reproducing the buggy behavior 
gtk version is : gtk2-2.10.4-20.el5

while on Suse Linux Enterprise server, where the defect happens, the gtk version is : gtk2-2.14.4-16.1

does this mean we need to file a bug against gtk or try to handle things using api's from within swt?
Comment 15 Mohamed El-Kholy CLA 2011-03-27 10:00:19 EDT
the red hat machine I am working on is not reproducing the buggy behavior 
gtk version is : gtk2-2.10.4-20.el5

while on Suse Linux Enterprise server, where the defect happens, the gtk version is : gtk2-2.14.4-16.1

does this mean we need to file a bug against gtk or try to handle things using api's from within swt?
Comment 16 Felipe Heidrich CLA 2011-03-28 12:14:15 EDT
(In reply to comment #15)

> does this mean we need to file a bug against gtk or try to handle things using
> api's from within swt?

you can try both, but before reporting a bug against gtk try to write a gtk app that shows the alignment is inconsistent in GtkLabel between a wrappable and a non wrappable control.
Comment 17 Eric Williams CLA 2018-11-30 10:46:55 EST
SLED11 is no longer a supported target environment, please reopen this ticket if the issue reproduces on 4.9/4.10 in a supported target environment.