| Summary: | Suse11 and zh locale--Width of MessageDialog always reaches the maximum of screen width | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | yanghang | ||||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||
| Status: | RESOLVED WORKSFORME | QA Contact: | Bogdan Gheorghe <gheorghe> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ericwill, mukund, raji, Silenio_Quarti, yanghang | ||||||
| Version: | 3.5.2 | Keywords: | triaged | ||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 168504 [details]
locale result to confirm your setting is correct
Created attachment 168506 [details]
the result when click button
Bogdan, please investigate once E4 is out. Suse11 is no longer a supported platform. |
Build Identifier: My sample code is below: import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class MessageDialogTest extends Shell { /** * Launch the application * @param args */ public static void main(String args[]) { try { Display display = Display.getDefault(); MessageDialogTest shell = new MessageDialogTest(display, SWT.SHELL_TRIM); shell.open(); shell.layout(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } } catch (Exception e) { e.printStackTrace(); } } /** * Create the shell * @param display * @param style */ public MessageDialogTest(Display display, int style) { super(display, style); createContents(); } /** * Create contents of the window */ protected void createContents() { setText("SWT Application"); setSize(500, 375); final Button button = new Button(this, SWT.NONE); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent arg0) { String[] buttonString = {IDialogConstants.OK_LABEL,IDialogConstants.CANCEL_LABEL}; MessageDialog md = new MessageDialog(MessageDialogTest.this, "remove", null, "message dialog T" + "", MessageDialog.QUESTION, buttonString, 1); int doSend = md.open(); } }); button.setText("button"); button.setBounds(22, 143, 48, 26); // } protected void checkSubclass() { // Disable the check that prevents subclassing of SWT components } } when click the button, will pop up message Dialog, the width reaches the maximum of screen width Reproducible: Always Steps to Reproduce: 1. create test.jar with the code 2.in terminal, input cmd below a:) input export LC_ALL=zh_CN to setting locale b:) input locale to confirm you setting is correct c:) input java -jar test.jar , and click the button