| Summary: | TVT36:TCT186: TVT_KOR: Truncation on button | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] Target Management | Reporter: | CDE Administration <cdeadmin> | ||||||
| Component: | RSE | Assignee: | Xuan Chen <xuanchen> | ||||||
| Status: | CLOSED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | camle, kitlo, pwebster, susan, xuanchen | ||||||
| Version: | 3.2 | ||||||||
| Target Milestone: | 3.2 RC1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
CDE Administration
Created attachment 167615 [details]
14.000.280.png
<cde:tctdetail> Testcase: 14.000.280 Project: WSW36 Component: Xfer - Target Management/RSE Priority: 2 Subject: TVT_KOR: Truncation on button Article ID: 186 Originator: mjcho@kr.ibm.com </cde:tctdetail> <response_by> Keiko Terada at 2010.05.10.03.08.41 </response_by> same problem for Japanese Created attachment 167666 [details]
186_14.000.280.gif
This is not a TVT problem (no need to change the PII file). We will fix it in service pack of RSE 3.2. Xuan, do you think this is similar to bug 311940, where the dialog page is calling setButtonLayoutData before it sets up the proper font in the buttons? Yeah, it looks like the same problem. Thanks. Actually, I took a look at our code, and it seems we already used the suggestion that Susan made in bug 311940. This is our code: Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, SystemResources.RESID_SELECTFILES_DESELECTALL_BUTTON_ROOT_LABEL, false); And this is the method createButton in Dialog: protected Button createButton(Composite parent, int id, String label, boolean defaultButton) { // increment the number of columns in the button bar ((GridLayout) parent.getLayout()).numColumns++; Button button = new Button(parent, SWT.PUSH); button.setText(label); button.setFont(JFaceResources.getDialogFont()); button.setData(new Integer(id)); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { buttonPressed(((Integer) event.widget.getData()).intValue()); } }); if (defaultButton) { Shell shell = parent.getShell(); if (shell != null) { shell.setDefaultButton(button); } } buttons.put(new Integer(id), button); setButtonLayoutData(button); return button; } As you can see, it calls: button.setFont(JFaceResources.getDialogFont()); first, and then calls: setButtonLayoutData(button); But we still have the truncation problem for Korean. If I change to code to: Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, "really really really long name", false); I can see the button re-size properly to display the long English name. (In reply to comment #8) > > But we still have the truncation problem for Korean. > > If I change to code to: > > Button deselectButton = createButton(buttonComposite, > IDialogConstants.DESELECT_ALL_ID, > "really really really long name", false); > > I can see the button re-size properly to display the long English name. So you are saying a Korean label is truncated and an English label is not? Or is the timing of setting the label different? If it is happening with Korean strings and not English strings, then maybe the font itself has a problem. You might try changing the dialog font in the Eclipse preferences and see if it seems to be related to a particular font. Susan, I posted some comments regarding to the font of this problem in bug 311940: https://bugs.eclipse.org/bugs/show_bug.cgi?id=311940#c22 For Korean, I tried several different fonts, and they all have problems. Right now, the only way I have to workaround this problem is to manually resize the button by adding the following code: GridData buttonData = (GridData)deselectButton.getLayoutData(); buttonData.widthHint = buttonData.widthHint * 130 / 100; Please comment. Thanks. I will check in the workaround I proposed. Thanks. A checkin has been made on Tue 18-May: [dsdp-tm-cvs-commit] xchenorg.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogsSystemSelectFileTypesDialog.java Please adjust the bugzilla state if this is considered fixed. Also, since we are in TM endgame mode, please attach a patch for every change being committed such that your fellow committers can review. This problem is fixed. <response_by> Keiko Terada at 2010.05.24.00.19.40 </response_by> Verified fix for JA in 20100522-1600, thanks. <response_by> MiJung Cho at 2010.05.27.04.11.03 </response_by> Hello, It is fixed for korean in 20100522 build Thanks MJ |