Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 55750

Summary: Workbench colors need OS specific tweaks, e.g. unselected tabs cannot be read on Solaris
Product: [Eclipse Project] Platform Reporter: Grant Gayed <grant_gayed>
Component: UIAssignee: Kim Horne <eclipse>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: andre_weinand, billy.biggs, erich_gamma, lindawat, michaelvanmeekeren, Tod_Creasey
Version: 3.0   
Target Milestone: 3.0 RC1   
Hardware: Sun   
OS: Solaris   
Whiteboard:
Bug Depends on: 61916    
Bug Blocks: 56476    
Attachments:
Description Flags
Patch to add RGBContrastFactory
none
Patch using RGBContrastFactory none

Description Grant Gayed CLA 2004-03-23 15:01:32 EST
0323 12:08p integration build
observed on solaris and aix (and likely would happen on hpux if it started)

I do not know how to attach a screen shot, but this makes eclipse close to
unusable on these platforms.  CTabItem titles, chevrons and decorations are
invisible to the user.
Comment 1 Stefan Xenos CLA 2004-03-23 17:54:44 EST
If you cannot attach a screenshot, please describe the symptoms in more detail. 

Are the tabs too small? Are they missing text? Are the tabs missing entirely?
When you say "unselected", does this mean that the tab with focus can be seen?

Comment 2 Grant Gayed CLA 2004-03-24 08:46:29 EST
The tab backgrounds and their texts are white, so the CTabFolder tab areas just 
look white, and the labels do not appear because their colours match.  Their 
size is fine.

I think this is the ui setting chosen colour values into the CTabFolder, and on 
solaris and aix the foreground and backgrounds are being set to the same (or 
the background is being set and the foreground default happens to match it).

By "unselected" I mean, if you have a perspective open with a stack of views in 
the top-right and another stack in the top-left, selecting one of the top-left 
views makes the tabs in the top-right stack unreadable, as well as any other 
top-left views whose tabs are showing.
Comment 3 Tod Creasey CLA 2004-03-24 10:14:14 EST
This is a problem of incompatible constants. Kims suggestion was to change the 
widget foreground to black by default for M8 and then do a better color 
resolver during M9.
Comment 4 Michael Van Meekeren CLA 2004-03-24 10:48:52 EST
asking others to comment on unusable platform specific color choices as well
Comment 5 Kim Horne CLA 2004-03-24 16:03:47 EST
A general solution for this problem is not possible for M8 and any solution we
could provide would be specific to one machine.  Deferring this to M9.  In the
meantime, I suggest you go to your Workbench->Colors and Fonts preference page
and set your colors to something usable.
Comment 6 Kim Horne CLA 2004-03-31 10:32:09 EST
I've added the ability for colors/fonts to describe their default values based
on the platform/windowing system.  We can now begin to address these issues.
Comment 7 Kim Horne CLA 2004-04-27 17:30:04 EDT
Motif colors have been improved in HEAD.   Please reopen if builds post
I20040427800 do not address this.
Comment 8 Grant Gayed CLA 2004-05-10 16:37:56 EDT
In 0506 the inactive tabs on Solaris 9 still show up as white-on-white.
Comment 9 Kim Horne CLA 2004-05-12 09:52:03 EDT
Michael changed the constants for the I20040511 build - has this been resolved?
Comment 10 Grant Gayed CLA 2004-05-12 10:46:03 EDT
no, inactive tabs are still white-on-white
Comment 11 Kim Horne CLA 2004-05-12 10:51:38 EDT
Is the tab background ENTIRELY white, or just mostly white?  It should be a
gradient with another colour...
Comment 12 Grant Gayed CLA 2004-05-12 10:56:47 EDT
it's entirely white
Comment 13 Kim Horne CLA 2004-05-12 11:32:42 EDT
The white-on-white problem is a bug in SWT where it can't draw gradients (or an
approximation of them) in the 8bit motif system.  Bug 61916 has been logged to
track this defect.  

There are ways in which we (Workbench) can work around this bug. Some of them
require API and the others may not be preferable.  We could add API to the
colorDefinition mechanism to filter based on color depth as well as
platform/windowing system.  We could also hardcode motiff to be gradientless or
provide a motif color file that has colors suitable for eclipse.

Alternatively we could decide not to provide a workaround at all for 3.0.  
Comment 14 Kim Horne CLA 2004-05-17 09:32:33 EDT
Platform has no reasonable workaround for this bug in the M9 timeframe.  We're
dependant on 61916 for a fix.
Comment 15 Michael Van Meekeren CLA 2004-05-25 15:43:26 EDT
bug 61916 has been marked as WONTFIX, although they now use the other gradient 
colour as the background.  Kim, can you please verify whether this is 
acceptable on Motif?
Comment 16 Kim Horne CLA 2004-05-27 11:48:14 EDT
We're still broken, but in a differnet way.  Now that the values that are used
by the CTabFolder in 8bit colour mode have been switched, our active no focus
editor is white on white.  This also impacts high contrast mode.

Billy is working on a colour factory to address this concern.  It will supplied
with three colours: the required forground colour and two candidate background
colours.  The factory will then choose the background colour that provides the
best contrast when paired with the forground colour.  
Comment 17 Billy Biggs CLA 2004-05-27 12:48:24 EDT
Created attachment 11217 [details]
Patch to add RGBContrastFactory

This patch creates a new colour factory that selects the background colour with
highest contrast to the foreground.  The contrast difference is calculated as
the distance in lightness under the IPT perceptual colourspace.
Comment 18 Billy Biggs CLA 2004-05-27 12:49:09 EDT
Created attachment 11218 [details]
Patch using RGBContrastFactory

Here is how the RGBContrastFactory can be used in the eclipse UI plugin.xml to
select whichever of widget_background or white has higher contrast with
widget_foreground.
Comment 19 Kim Horne CLA 2004-05-27 13:24:22 EDT
Fix in HEAD.
Comment 20 Kim Horne CLA 2004-06-01 14:13:54 EDT
Verified on the Solaris box in question using RC1.  Also verified in High
Contrast  Windows XP.
Comment 21 Kim Horne CLA 2004-06-01 14:14:25 EDT
(Marking as verified)
Comment 22 Kim Horne CLA 2004-07-06 09:30:07 EDT
Closing to keep a tidy house.  Pardon the spam.