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

Bug 327965

Summary: Many C++ documentation hover boxes unusable: black text on a black background
Product: [Tools] Linux Tools Reporter: Ashley Kirby <ashley>
Component: LibhoverAssignee: Jeff Johnston <jjohnstn>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
A screenshot of one of my many black on black hovers. none

Description Ashley Kirby CLA 2010-10-15 22:28:42 EDT
Build Identifier: 20100917-0705

Hover boxes all have black backgrounds, but many blocks of text displayed are also black.
See screen shot, if I can find a place to attach one...

Reproducible: Always

Steps to Reproduce:
1. Place mouse over context sensitive item in a C++ source file 
2. Wait for hover box to appear
3. Suppress anger/frustration from being unable to read anything.
Comment 1 Ashley Kirby CLA 2010-10-15 22:44:17 EDT
Created attachment 181030 [details]
A screenshot of one of my many black on black hovers.

Seems the issue is that the background color is being pulled from the system's desktop theme settings.

Still, I'm using the Radiance theme which is the default on the Ubuntu desktop distribution, so I would imagine that this issue is pretty common.

Still, I came across another bug reports for a different module which was very similar to the one I am filing now. That report was flagged as being fixed, with the fixed hovers no longer using the system to define the background colors. Is it possible that a fix has already been devised, but just never applied to this module?
Comment 2 Jeff Johnston CLA 2010-10-18 12:18:21 EDT
(In reply to comment #1)
> Created an attachment (id=181030) [details]
> A screenshot of one of my many black on black hovers.
> 
> Seems the issue is that the background color is being pulled from the system's
> desktop theme settings.
> 
> Still, I'm using the Radiance theme which is the default on the Ubuntu desktop
> distribution, so I would imagine that this issue is pretty common.
> 
> Still, I came across another bug reports for a different module which was very
> similar to the one I am filing now. That report was flagged as being fixed,
> with the fixed hovers no longer using the system to define the background
> colors. Is it possible that a fix has already been devised, but just never
> applied to this module?

Can you specify the bug number here for the bug you found?  I found the issue on a forum whereby the solution was to change the background colour in the Preferences (Window->Preferences->Java->Editor).  Select the Source Hover Background colour.  It will likely be set tov "use system default" and will show you what it "thinks" that colour is.  Un-check the box and manually specify what colour you want.  That should at least get you around the problem. 

Now, libhover does not implement the drawing of the hover.  It uses a CDT extension and simply supplies the data to the CDT which sets up a set of hovers in a chain waiting for one to supply the data or punt and let the next in the chain field the request.

You should be seeing the same behaviour when hovering over a variable, for example, which is not handled by libhover (it punts in this case).

If the system background colour was black when you went to the preferences, then the issue was simply that the system default and foreground colour were the same.  If Eclipse thought the background colour was something different, then this bug needs to be assigned to the CDT to handle in a similar manner to how the Build Console background colour was fixed (similar problem of black text on black background, but different code).
Comment 3 Ashley Kirby CLA 2010-10-19 00:49:53 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > Created an attachment (id=181030) [details] [details]
> > A screenshot of one of my many black on black hovers.
> > 
> > Seems the issue is that the background color is being pulled from the system's
> > desktop theme settings.
> > 
> > Still, I'm using the Radiance theme which is the default on the Ubuntu desktop
> > distribution, so I would imagine that this issue is pretty common.
> > 
> > Still, I came across another bug reports for a different module which was very
> > similar to the one I am filing now. That report was flagged as being fixed,
> > with the fixed hovers no longer using the system to define the background
> > colors. Is it possible that a fix has already been devised, but just never
> > applied to this module?
> 
> Can you specify the bug number here for the bug you found?  I found the issue
> on a forum whereby the solution was to change the background colour in the
> Preferences (Window->Preferences->Java->Editor).  Select the Source Hover
> Background colour.  It will likely be set tov "use system default" and will
> show you what it "thinks" that colour is.  Un-check the box and manually
> specify what colour you want.  That should at least get you around the problem. 
> 
> Now, libhover does not implement the drawing of the hover.  It uses a CDT
> extension and simply supplies the data to the CDT which sets up a set of hovers
> in a chain waiting for one to supply the data or punt and let the next in the
> chain field the request.
> 
> You should be seeing the same behaviour when hovering over a variable, for
> example, which is not handled by libhover (it punts in this case).
> 
> If the system background colour was black when you went to the preferences,
> then the issue was simply that the system default and foreground colour were
> the same.  If Eclipse thought the background colour was something different,
> then this bug needs to be assigned to the CDT to handle in a similar manner to
> how the Build Console background colour was fixed (similar problem of black
> text on black background, but different code).

Thank you very much!

For the C++ editor, I found the option buried under: 
"Window -> Preferences -> C/C++ -> Editor" Looking through the list of "Appearance color options" I located the option for "Source hover background." The checkbox for "System Default" was checked. After removing the check from the box, I was able to change the hover background color. Problem resolved.