| Summary: | [TextSizeDetermination] Mark temporary layout when performed with the larger bounds | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Istvan Ballok <Istvan.Ballok> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | cole, fr.appel, rsternberg, ruediger.herrmann, swimmer_86 |
| Version: | 1.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Istvan Ballok
Proposed workaround: mark this temporary layout with an attribute in the session.
@@ -135,11 +135,13 @@ final class TextSizeDeterminationHandler
= ( IShellAdapter )shell.getAdapter( IShellAdapter.class );
Rectangle bounds1000 = new Rectangle( bufferedBounds.x,
bufferedBounds.y,
bufferedBounds.width + 1000,
bufferedBounds.height + 1000 );
+ ContextProvider.getSession().setAttribute( "TextSizeDeterminationHandler.bounds1000", Boolean.TRUE );
shellAdapter.setBounds( bounds1000 );
+ ContextProvider.getSession().removeAttribute( "TextSizeDeterminationHandler.bounds1000");
WidgetTreeVisitor.accept( shell, clearLayout );
shellAdapter.setBounds( bufferedBounds );
WidgetTreeVisitor.accept( shell, restoreSCOrigins );
}
}
Istvan, could you please elaborate a little bit on how the larger bounds can interfere with custom layout logic? In my opinion a custom layout should be able to deal correctly with resize events as this is part of the layout contract. If it does not, this is rather a problem of the custom layout than of the RWT core functionality. So if I am not missing a point completely, I suggest to close this issue as invalid. (In reply to comment #2) Frank, I am sorry that I did not update this ticket - I understand your argumentation; custom layout logic should handle (any) layout events correctly. So I too suggest to close this issue as invalid. I could in fact fix our custom layout logic, so that the temporary layouts do not cause a problem any more. Done as proposed in the comments above :-) Why is the such big constant (1000) used for sizes determination? (In reply to comment #5) > Why is the such big constant (1000) used for sizes determination? What's wrong with that? The value has to be large to ensure changes are propagated to all nested controls. But let's not pollute the bugzilla discussions on implementation details. If you have ideas for improvement, let's discuss them on the newsgroup or open a new enhancement request. |