Bug 33517 - "Banded" Background shows through checkboxs
Summary: "Banded" Background shows through checkboxs
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-28 03:12 EST by Boris Pruessmann CLA
Modified: 2003-10-02 17:57 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot taken from Update Manager (8.97 KB, application/pdf)
2003-02-28 03:12 EST, Boris Pruessmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Pruessmann CLA 2003-02-28 03:12:17 EST
I2003-02-27

Now that the background issue with labels seems to be solved, I found that checkboxes seem to have the same issue. The attached screenshot is taken from the Update Manage.
Comment 1 Boris Pruessmann CLA 2003-02-28 03:12:49 EST
Created attachment 3770 [details]
Screenshot taken from Update Manager
Comment 2 Steve Northover CLA 2003-03-03 22:23:11 EST
If the Upate manager sets the background color, then the bands won't show.  
Run the ControlExample to and set the background color to see this working.  
Alternately, the Update Manger should leave all the colors alone and then all 
the widgets should draw banded.
Comment 3 Andre Weinand CLA 2003-03-04 16:48:15 EST
OK, but then it isn't a "won't fix" but more a PDE problem.
Reopening and moving to PDE.
Comment 4 Dejan Glozic CLA 2003-03-04 17:50:08 EST
We DO set the background to match the background of the editor/view area. I 
don't think this is a PDE problem (although cannot claim 100%). All the widgets 
that appear in PDE forms have the background and foreground explicitly set 
using 'setBackground' and 'setForeground', otherwise they would have the 
default control colors (e.g. gray on default Windows).
Comment 5 Steve Northover CLA 2003-03-04 20:09:50 EST
It's quite possible this is an SWT problem although it doesn't show up in the 
ControlExample.  Someone needs to construct a simple case ...
Comment 6 Dejan Glozic CLA 2003-03-04 20:13:17 EST
I would be happy to do it, but unfortunately I don't have a Mac here so cannot 
verify if it demonstrates the problem.

Here is what we do to create the checkbox (this is a method from the
class 'FormWidgetFactory' that is used to create all the widgets in 
PDE 'flat' style forms):

	public Button createButton(Composite parent, String text, int style) {
		int flatStyle = BORDER_STYLE == SWT.BORDER ? SWT.NULL :SWT.FLAT;
		Button button = new Button(parent, style | flatStyle);
		button.setBackground(backgroundColor);
		button.setForeground(foregroundColor);
		if (text != null)
			button.setText(text);
		button.addFocusListener(visibilityHandler);
		return button;
	}

Comment 7 Dejan Glozic CLA 2003-03-04 20:15:57 EST
Also note that by default colours are set to those obtained from 
SWT.COLOR_LIST_BACKGROUND and SWT.COLOR_LIST_FOREGROUND, respectively.
Comment 8 Andre Weinand CLA 2003-10-02 17:57:59 EDT
Problem no longer occurs in recent builds.