Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 379136

Summary: Incorrect Text Size Determination for JFace Dialog
Product: [RT] RAP Reporter: Scott Helsby <scott.helsby>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bugs.eclipse.org
Version: unspecified   
Target Milestone: 2.2 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
An EntryPoint class that opens a dialog showing the problem none

Description Scott Helsby CLA 2012-05-10 10:31:54 EDT
Build Identifier: 

Another issue of controls being cut off when using Chinese characters.

Reproduced it with a very simple snippet that opens a dialog containing a label and a combo.

The Label and Combo are properly resized, but the Shell is not.

Reproducible: Always
Comment 1 Scott Helsby CLA 2012-05-10 10:33:35 EDT
Created attachment 215404 [details]
An EntryPoint class that opens a dialog showing the problem
Comment 2 Ivan Furnadjiev CLA 2012-08-14 05:36:56 EDT
As a workaround override the Dialog#configureShell as follows:
@Override
protected void configureShell( Shell shell ) {
  super.configureShell( shell );
  // Workaround for RWT Text Size Determination
  shell.addControlListener( new ControlAdapter() {
    @Override
    public void controlResized( ControlEvent e ) {
       initializeBounds();
    }
  } );
}
Comment 3 Ralf Sternberg CLA 2013-07-24 04:49:19 EDT
This is not related to Chinese in particular. The initializeBounds method is not called when the TSD results arrive, but it should be. I'd suggest to add this resize listener to the Dialog framework.
Comment 4 Ivan Furnadjiev CLA 2013-07-24 10:58:45 EDT
Fixed with commit 18f4b7e1b5195e04f2431f8f1db90f1897b8a6b8.