Bug 37456 - [Palette] setting change should be applied dynamically to the palette figures
Summary: [Palette] setting change should be applied dynamically to the palette figures
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Draw2d (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 13813 113160
Blocks:
  Show dependency tree
 
Reported: 2003-05-09 21:17 EDT by Masaki Saitoh CLA
Modified: 2010-11-04 17:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Saitoh CLA 2003-05-09 21:17:04 EDT
If you change system setting with ControlPanel when you have logic editor and
its palette open, the color of figure created by ToolEntryEditPart remains as 
it is.  From the accessibility point of view, this would be violation.
It is okay for logic editor because it is a sample implementaiton but I am also 
usinng ToolEntryEditPart for my editor implementation.

The figure uses ColorConstatnts for its foregournd, background, border color, 
and so on.  However ColorConstants fields are static and never flushed until 
you reload the class.

step:
1) open logic editor and its palette
2) open Winodows Control Panel -> Display Setting -> Design
3) change the setting to High Contrast #1
4) new color setting is applied dynamically to most windows on your screen
5) logic editor and its palette remain as they were
Comment 1 Randy Hudson CLA 2003-05-10 13:07:59 EDT
The Editor tabs in Eclipse show the same problem.  Look at the gradients used 
to show active editor, then change your system colors for foreground title.

Of course, draw2d is more obvious because we cache every system color, but it 
is the same problem.

See bug 13813
Comment 2 Randy Hudson CLA 2005-10-05 10:50:32 EDT
we can fix it now! yea!
Comment 3 Randy Hudson CLA 2005-10-05 10:52:13 EDT
Pratik, ColorConstants will no longer be constant (final) as a result of this. 
When the class is initialized, it should get the current display and hook the 
necessary listeners.

Hopefully, the OS already tells controls to repaint when colors change. If not, 
we'll need additional listeners on every LWS.
Comment 4 Pratik Shah CLA 2005-10-28 17:51:40 EDT
Fixing this will cause a breaking API change.  ColorConstants is an interface 
and will need to be changed to a class.
Comment 5 Pratik Shah CLA 2005-10-30 19:01:50 EST
Another problem will be that updating the ColorConstants in Draw2d will not 
affect any existing LWS.  Any colors set on figures would have to be reset to 
see the change.
Comment 6 Randy Hudson CLA 2005-10-30 20:15:58 EST
Pratik, see bug 113160
Comment 7 Pratik Shah CLA 2006-01-20 12:01:21 EST
Bug 113160 has been marked as WONTFIX.  We can fix this on our end if SWT can make the Color class mutable (not final).  Otherwise, there's not much we can do.