Summary: | [Eclipse Forms] Label on a coloured parent has repaint problems | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Dejan Glozic <dejan> | ||||
Component: | UI | Assignee: | Dejan Glozic <dejan> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P1 | CC: | billy.biggs, eclipse.felipe, kdkelley, steve_northover | ||||
Version: | 3.0 | ||||||
Target Milestone: | 3.0 RC4 | ||||||
Hardware: | PC | ||||||
OS: | Linux-GTK | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Dejan Glozic
2004-06-18 15:31:33 EDT
*** Bug 63409 has been marked as a duplicate of this bug. *** *** Bug 67160 has been marked as a duplicate of this bug. *** The problem is because of Label.computeSize() called in the paint event. Any comments Steve? There is a problem on GTK when a resize occurs within a paint. In Label.computeSize, in order to get the size right with wrapping, the size of the Label is temporarily changed to the size of the wHint and hHint and then changed back. Any change to Label.computeSize will have a major effect on Eclipse and this is too risky at this point in the schedule. However, looking at the code in Section.onPaint, it is not clear why textLabel.computeSize is being called. In ExpandableLayout of ExpandableComposite, the size of the textLabel has already been calculated and setBounds has been called. Since the resize event will happen before the paint event, why doesn't Section.onPaint just call textLabel.getSize() rather than textLabel.computeSize? Calling getSize() rather than computeSize() will get rid of this problem and will also be more accurate since the sizing calculation code will not be duplicated. The relative order of calls was something I didn't know about and therefore could not count on. We will try the workaround and see if it works for us. VI, do you have a simple testcase for this problem ? Do we know exactly what goes wrong when calling computeSize from a paint callback ? During my tests I could verify the always computeSize returns the right value. Moving to Eclipse Forms to address in RC4 time frame. Their still seems to be a bug on SWT somewhere. You shouldn't get the cheese (or at least you should get the same cheese on every platform). Once we verify that using 'getSize' works for us, I will re-route the bug back to SWT to address post 3.0. Created attachment 12590 [details]
The fix to use 'getSize' instead of 'computeSize'
We confirmed that the patch addresses the vanishing on our Linux machine. Patch applied and released. |