Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327790 - [Widgets] Controls with null background inside Group or TabFolder do not display correctly in Cocoa
Summary: [Widgets] Controls with null background inside Group or TabFolder do not disp...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 3.6.2   Edit
Assignee: Scott Kovatch CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on: 290212
Blocks:
  Show dependency tree
 
Reported: 2010-10-14 11:43 EDT by Scott Kovatch CLA
Modified: 2011-01-18 12:19 EST (History)
3 users (show)

See Also:
Silenio_Quarti: review+


Attachments
Fix for 3.6.2 (2.40 KB, patch)
2011-01-14 18:16 EST, Scott Kovatch CLA
no flags Details | Diff
Fix for 3.6.2 (2.96 KB, patch)
2011-01-14 18:20 EST, Scott Kovatch CLA
no flags Details | Diff
Updated 3.6.2 patch (3.01 KB, patch)
2011-01-17 20:44 EST, Scott Kovatch CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Kovatch CLA 2010-10-14 11:43:45 EDT
+++ This bug was initially created as a clone of Bug #290212 +++

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Build Identifier: I20090917-0100

SWT controls that are the children of a Group or TabFolder do not have their backgrounds filled correctly. Essentially, the control backgrounds look wrong. This problem does not exhibit in Carbon - only Cocoa.

Bug #234240 dealt with a similar problem. It's probably not related.
Bug #283045 looks like it could be the problem that was fixed by the resolution of the above Bug #234240.

Screen shot is attached. Test code will be uploaded in the next few days, but it's a simple thing to reproduce -- not so simple (for me) to solve at this point. I suspect that the alpha value passed to the underlying Cocoa routine (in Control.fillBackground) is not having the desired effect.

Reproducible: Always




See attached screenshot
Comment 1 Scott Kovatch CLA 2010-10-14 11:45:00 EDT
Cloned for 3.6.2. No rush, but it would be good to consider this for 3.6.2.
Comment 2 Simon Pope CLA 2010-10-14 18:28:13 EDT
This is most likely the same bug as Bug 297633. The fix for this was in combination with Bug 290212 that Scott fixed. I haven't seen the *actual* patch but if it's the same as the one I described in these above two bugs, it should be good.

I'm running with a patched system here, so when you upload the test case, I'll check the changes in the HEAD and confirm that it's fixed by the fixes for these other bugs. I've spent so much time getting widgets to work correctly in Groups and TabFolders that I'd be amazed if this is *not* the case. But it's always possible!

By the way, you forgot the screenshot.
Comment 3 Scott Kovatch CLA 2011-01-14 18:16:57 EST
Created attachment 186864 [details]
Fix for 3.6.2

Patch from original bug applied to 3.6.2.
Comment 4 Scott Kovatch CLA 2011-01-14 18:17:15 EST
Ready for review.
Comment 5 Scott Kovatch CLA 2011-01-14 18:20:51 EST
Created attachment 186865 [details]
Fix for 3.6.2

Wrong patch first time.
Comment 6 Silenio Quarti CLA 2011-01-17 17:45:10 EST
Should Button.drawsBackground() (label too) check for "backgroundImage != null" as well? I have not tried but I believe if someone sets a background image in a button or label, it is not going to work?


	return background != null || backgroundImage != null;
Comment 7 Simon Pope CLA 2011-01-17 18:14:39 EST
(In reply to comment #6)
> Should Button.drawsBackground() (label too) check for "backgroundImage != null"
> as well? I have not tried but I believe if someone sets a background image in a
> button or label, it is not going to work?
> 
> 
>     return background != null || backgroundImage != null;

Good point. Yes. Your code above is correct and we need to alter the patch accordingly.
Comment 8 Scott Kovatch CLA 2011-01-17 20:44:48 EST
Created attachment 186962 [details]
Updated 3.6.2 patch

Updated with the suggestion in comment #6
Comment 9 Silenio Quarti CLA 2011-01-18 09:46:06 EST
Need to fix HEAD as well.
Comment 10 Scott Kovatch CLA 2011-01-18 12:19:37 EST
Fixed in HEAD and on the 3_6_maintenance branch > 20110118.