Bug 19229 - Changing color scheme in windows messes up view colors
Summary: Changing color scheme in windows messes up view colors
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Kevin McGuire CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 19218 50361 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-04 17:27 EDT by Curtis d'Entremont CLA
Modified: 2020-06-03 03:16 EDT (History)
5 users (show)

See Also:
Kevin_McGuire: review+


Attachments
Patch implementing color update due to system change (8.69 KB, patch)
2007-10-31 14:48 EDT, Kevin McGuire CLA
Kevin_McGuire: review?
Details | Diff
Updated test case to match last-wins for color defs (1.82 KB, text/plain)
2007-12-02 17:33 EST, Kevin McGuire CLA
Kevin_McGuire: review?
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis d'Entremont CLA 2002-06-04 17:27:56 EDT
Build F2 (20020602)
Win2K

If you switch windows color scheme after you started eclipse, then Eclipse 
hangs on to some of the old colors for certain things. Examples of this are 
background colors for view icons like the 'X' to close the view, and the 
gradient color of the title bar for a view.

- Go to display properties in windows -> Appearance.
- Set your scheme to "Maple"
- Open Eclipse
- Set your scheme to "Slate"
- Go back to Eclipse
- Focus on one of the views

Notice how the views still use colors from the old scheme.
Comment 1 Curtis d'Entremont CLA 2002-06-04 17:30:09 EDT
Related to PR# 19218
Comment 2 Nick Edgar CLA 2002-06-05 11:51:54 EDT
You currently need to restart to get the new settings.
Need SWT support for this.
Comment 3 Nick Edgar CLA 2002-06-05 15:54:49 EDT
Toolbar button background colours also do not update properly.
Comment 4 Nick Edgar CLA 2002-06-05 15:55:01 EDT
*** Bug 19218 has been marked as a duplicate of this bug. ***
Comment 5 Mike Wilson CLA 2002-06-10 11:14:02 EDT
Post R2.0.
Comment 6 Steve Northover CLA 2002-08-20 17:10:12 EDT
Viki, how far did we get with this one?  I seem to remember that we fixed all 
the places in SWT but needed to change Eclipse.
Comment 7 Veronika Irvine CLA 2002-08-22 09:32:24 EDT
New API is needed for the gradient stuff on CLabel and CTabFolder.  I believe 
that is the only outstanding thing.
Comment 8 Steve Northover CLA 2002-08-22 10:32:11 EDT
Was there not a simple change that would let them get it "for free"?  Let's get 
them to do it rather than adding API.
Comment 9 Steve Northover CLA 2007-06-18 15:35:57 EDT
The SWT.Settings callback can be used to change any hard coded gradients that Eclipse has set for CTabFolder and CLabel.
Comment 10 Kevin McGuire CLA 2007-06-20 11:14:52 EDT
I assume the roadblock was that platform UI couldn't listen for changes to system colors.  If we can do that now then we can consider fixing this.
Comment 11 Kim Horne CLA 2007-06-20 14:29:39 EDT
*** Bug 50361 has been marked as a duplicate of this bug. ***
Comment 12 Kevin McGuire CLA 2007-10-31 14:48:06 EDT
Created attachment 81755 [details]
Patch implementing color update due to system change

This patch hooks the SWT callback notifying of system changes.
It then rereads the themes and updates the color registries.

If this code looks good, I figure out the corresponding changes for fonts.
Comment 13 Kevin McGuire CLA 2007-12-02 17:33:51 EST
Created attachment 84278 [details]
Updated test case to match last-wins for color defs

Update to the test suites to match the new behaviour.  The code patch made it so new colour definitions would override existing ones (previously they were ignored). The ThemesTestSuite checked for this by attempting to define the same colors (swtcolor and rgbcolor) twice, checking that the resulting value matched the first definition.  The test has been changed to verify that it matches the last definition.  

One subtle change is that previously the 2nd definition was a bogus/invalid value, now it must be a legal value (I chose COLOR_RED) for the test to make sense.
Comment 14 Kim Horne CLA 2007-12-03 14:27:20 EST
I think this looks ok.
Comment 15 Kevin McGuire CLA 2007-12-03 15:08:59 EST
Released to HEAD, fixed in I20071203-0800.
Will open a different bug for corresponding font updating.
Comment 16 Kevin McGuire CLA 2007-12-20 10:50:17 EST
Verified in M4.

I've opened a new bug #19229 for the font specific work
Comment 17 Kevin McGuire CLA 2007-12-20 10:51:10 EST
(In reply to comment #16) 
> I've opened a new bug #19229 for the font specific work

Sorry that should be bug #213595.

Comment 18 Kevin McGuire CLA 2008-10-03 17:44:45 EDT
(cleaning up "My Requests" query)
Comment 19 Amit Mendapara CLA 2020-06-03 03:16:10 EDT
I don't know if these changes are still relevant but are causing issues on Linux because of a fix for the bug 563001.

The code in question is the method "updateThemes". See the bug 563001, comment 8 for details.