Community
Participate
Working Groups
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
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
we can fix it now! yea!
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.
Fixing this will cause a breaking API change. ColorConstants is an interface and will need to be changed to a class.
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.
Pratik, see bug 113160
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.