| Summary: | [Dialogs] TitleAreaDialog shoud allow more than 2 lines in the title message | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Chris Gross <schtoo> | ||||
| Component: | UI | Assignee: | Susan McCourt <susan> | ||||
| Status: | RESOLVED DUPLICATE | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P4 | CC: | billy.biggs, higginmi, mbarkhou | ||||
| Version: | 3.1 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Chris Gross
Created attachment 19760 [details]
Patch
This is a small patch that allows the TitleAreaDialog to layout according to
the size of the message. This is a very minor change. Only two methods are
affected and < 10 lines.
The problem with changing is twofold 1) It is easy to get a resize that can fire a large dialog off of the screen. We take a chance at breaking accessibility for a lot of people if we do this 2) Flash - it will cause a lot of extra resizes. Re 1: I understand that but I would think that would be something the developer who is extending TitleAreaDialog would/should be concerned about. I'd rather not have the TitleAreaDialog not tie my hands just because it is possible that I will screw up and do something stupid. Re 2: Yeah I realized this too. I'd like to rewrite the code a little not to use FormLayout and that would make the code a little simplier. Then I wouldn't have to switch the FormData/FormAttachments when the message text changes. I think with the new option in GridLayout in 3.1 it could be done. Then I don't think I'd have to do any extra resizes, with the exception of resizing just before open so that it does resize per the message text (with the assumption that you are not going to set the message text after the dialog is opened). Alternatively we could add an extra method for the user to explicitly set the number of lines that should be allowed for the message. *** Bug 95979 has been marked as a duplicate of this bug. *** FYI, the patch I submitted really needs to be rewritten. There are more than a few problems with it. I'd like to rewrite it (when I can find the time). I have also run into this problem. It is made worse by the use of large fonts, e.g., high-contrast mode. I have created a work-around that relies on a feature of the current TitleAreaDialog implementation where, when the default image is used, the bottom of the label containing the message lines up with the bottom of the label containing the image. If the user provides an image, the two labels may not be tied together in that manner. For that reason, I overrode setTitleImage to throw an UnsupportedOperationException. The same problem can arise when large fonts are used (e.g., high-contrast mode). In such cases, the work-around results in the same output as TitleAreaDialog. The work-around works in both 3.1.1 and 3.2. I would much prefer that TitleAreaDialog support multiple lines in the title area message. |