Bug 13813 - API request: notification when OS system colors change
Summary: API request: notification when OS system colors change
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 3.2 M3   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 9393 27588 37457 42325 61445 80244 (view as bug list)
Depends on:
Blocks: 37456 9567 50361 69862
  Show dependency tree
 
Reported: 2002-04-15 14:15 EDT by Ryan Cooper CLA
Modified: 2005-10-05 10:50 EDT (History)
15 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Cooper CLA 2002-04-15 14:15:42 EDT
Build: 20020411

Is there any API that supports notification when the OS system colors change? 
If not, would it be feasible for such an API to be developed?

Currently, if the system colors change, the background for editors and views, 
and the Eclipse window title bar change as well, but the title tabs for editors 
and views do not change until Eclipse is restarted. See bug 9567 for more 
details. If the API mentioned above were supplied, we would be able to fix this 
problem.
Comment 1 Mike Wilson CLA 2002-04-15 14:53:38 EDT
The current policy for SWT is that, if you want the system colors to be used, 
you should not set colors into widgets. I realize that this is not possible 
given the existing api on CTabFolders and CLabels. See bug 10963 for a 
description of a possible new API to support this.

Separate from that, this PR is a request for new API to allow applications to 
get a callback when system colors change. Marking this as "enhancement" to 
indicate this.

Comment 2 Randy Hudson CLA 2002-08-19 11:06:22 EDT
Couldn't notification in win32 be implemented already?

LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) {
	return null;
}

Comment 3 Veronika Irvine CLA 2002-09-11 14:06:46 EDT
Moving from Later.
Comment 4 Steve Northover CLA 2003-05-14 16:32:39 EDT
*** Bug 9393 has been marked as a duplicate of this bug. ***
Comment 5 Randy Hudson CLA 2003-09-01 14:56:16 EDT
*** Bug 42325 has been marked as a duplicate of this bug. ***
Comment 6 Kim Horne CLA 2004-04-26 10:25:41 EDT
Will this be addressed for 3.0?
Comment 7 Steve Northover CLA 2004-05-11 17:09:50 EDT
*** Bug 37457 has been marked as a duplicate of this bug. ***
Comment 8 Steve Northover CLA 2004-05-11 17:10:55 EDT
*** Bug 61445 has been marked as a duplicate of this bug. ***
Comment 9 Steve Northover CLA 2004-05-11 17:11:35 EDT
I20040506

When the Gtk+ theme is changed, many custom controls such as CTabFolder do not
have their colours updated.  On Linux-Gtk+, the ::style-set signal is emitted
when the system colours are changed:

http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#GtkWidget-style-set
http://mail.gnome.org/archives/gtk-devel-list/2002-October/msg00115.html

This could be used to implement an event which indicates that the system colour
constants in SWT have been updated.  I believe this is similar to bug 37457
which describes a similar event which is not propagated under Windows.
Comment 10 Randy Hudson CLA 2004-12-06 11:38:25 EST
*** Bug 80244 has been marked as a duplicate of this bug. ***
Comment 11 Christophe Cornu CLA 2005-03-29 10:59:55 EST
*** Bug 27588 has been marked as a duplicate of this bug. ***
Comment 12 Steve Northover CLA 2005-09-07 18:32:09 EDT
Andre, we have this implemented on all platforms and the code is released but 
we can't get notification when the 'Highlight Color' is changed.  We are using 
AEInstallEventHandler().  Do you have any ideas?
Comment 13 Steve Northover CLA 2005-09-28 16:05:29 EDT
Tod, is there any way to get notificiation when the 'Highlight Color' changes 
on the Mac?  We are using AEInstallEventHandler() to look for other system 
changes.
Comment 14 Tod Creasey CLA 2005-09-28 16:46:53 EDT
Do you mean one of the JFace colors? The banner or header color?
Comment 15 Billy Biggs CLA 2005-09-28 16:53:43 EDT
Steve's question was actually directed at Todd Brackett from Apple.
Comment 16 Steve Northover CLA 2005-09-28 17:36:14 EDT
Sorry Tod, I meant Todd.  Can one of you either delete or add a 'd' to your 
name or am I going to have to fix the bug on my side?
Comment 17 Steve Northover CLA 2005-09-28 17:36:57 EDT
;-)
Comment 18 Steve Northover CLA 2005-10-04 18:00:51 EDT
Fixed > 20051004

Silence from Apple means that we had to work around the problem on the Mac by 
diffing the selection color (ie. kThemeBrushPrimaryHighlightColor) in sleep
().  If we notice it changed, we send the settings event.  It's awful.
Comment 19 David Williams CLA 2005-10-04 18:13:27 EDT
wow.. I think this is nearly the oldest enhancement request in bugzilla! Opened
2002-03-25. Congratulations ... even if ugly, at least you're making progress! :) 


[sorry for the noise, hope you don't mind my attempt at humor ... and sincere
congratulations]
Comment 20 Steve Northover CLA 2005-10-04 19:40:46 EDT
Nawww ... I've fixed older.
Comment 21 Randy Hudson CLA 2005-10-05 10:50:02 EDT
I hope you aren't losing any sleep at night, Steve.
Thanks for the new function.