Bug 203274 - [Forms] Border calculation in FormToolkit.initializeBorderStyle looks wrong
Summary: [Forms] Border calculation in FormToolkit.initializeBorderStyle looks wrong
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-09-13 10:36 EDT by Nick Edgar CLA
Modified: 2007-09-25 12:28 EDT (History)
3 users (show)

See Also:


Attachments
patch (934 bytes, patch)
2007-09-17 12:19 EDT, Adam Archer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2007-09-13 10:36:53 EDT
3.3

It has:
			// Check for Windows Classic. If not used, set the style to BORDER
			RGB rgb = colors.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
			if (rgb.red != 212 && rgb.green != 208 && rgb.blue != 200)
				borderStyle = SWT.BORDER;

If it's trying to see if the background is something other than (212, 208, 200), then the &&s should be ||s.
Comment 1 Adam Archer CLA 2007-09-17 12:19:18 EDT
Created attachment 78567 [details]
patch

Yes, I think you're right.
Comment 2 Adam Archer CLA 2007-09-17 12:20:15 EDT
Dejan, Chris, can you comment?
Comment 3 Chris Goldthorpe CLA 2007-09-17 12:54:07 EDT
I agree with the logic, have you tested this on the classic theme to verify that it still takes the same path?
Comment 4 Adam Archer CLA 2007-09-17 13:26:12 EDT
I have now.  :)

The statement is true without the classic theme and false with it, as it was before.
Comment 5 Chris Goldthorpe CLA 2007-09-17 13:44:00 EDT
+1

I'll commit this for the next milestone.
Comment 6 Chris Goldthorpe CLA 2007-09-25 12:04:30 EDT
Fixd in HEAD.