| Summary: | [Dialog] Initial size is too big | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Robert Mägel <r.maegel> | ||||
| Component: | JFace | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | ivan | ||||
| Version: | 2.2 | ||||||
| Target Milestone: | 2.2 RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
In 2.2M1 (bug 379136) we added a resize listener to dialog/window shell for re-initialization of dialog bounds after the availability of correct text sizes. As ScrolledComposite content is resized back to original size after the Shell (see TextSizeRecalculation#forceShellRecalculations) the dialog bounds are re-initialized with bigger values (+1000). Changing the order in TextSizeRecalculation#forceShellRecalculations (restoreScrolledCompositeOrigins first than restoreShellSize) fixes the problem, but I'm not 100% sure if this change will not break anything else. As a workaround you could specify the preferred size of your ScrolledComposite by setting it's layout data: scrollBase.setLayoutData( new GridData( 500, 300 ) ); Fixed with commit 4b5357b9ac2c423d36333f6627e5aca6208be233. |
Created attachment 237524 [details] The dialog code Tested on: RAP 2.2 M3 On first opening a dialog with a ScrolledComposite the size of the dialog is too big. The dialog fills the horizontal and vertical space. If the dialog is closed and opened again the dialog size is correct. The error doesn't occur on RAP 2.0 and RAP 2.1 In the attachment you can find the code of the dialog.