Bug 381010 - Tooltip background color is not configurable via CSS
Summary: Tooltip background color is not configurable via CSS
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 minor with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2012-05-30 06:21 EDT by Mark S. CLA
Modified: 2020-06-03 13:51 EDT (History)
14 users (show)

See Also:


Attachments
Screenshot (114.43 KB, image/png)
2016-09-21 07:57 EDT, Lars Vogel CLA
no flags Details
Content Assists (53.66 KB, image/png)
2016-09-21 07:58 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark S. CLA 2012-05-30 06:21:12 EDT
Build Identifier: 

see, for example:

https://bugs.launchpad.net/ubuntu/+source/light-themes/+bug/540332

That issue is still a very boring one because there is no configuration option in Eclipse to change tooltip colors.

Reproducible: Always
Comment 1 Otto Allmendinger CLA 2012-11-04 10:14:31 EST
+1 

Gnome 3.6 was released just now, the default tooltip background color is dark. Especially links that are blue by default are impossible to read against the dark background. 

The default tooltip background color for eclipse should be white since some elements that are rendered inside the tooltip assume that it is and are unreadable otherwise.
Comment 2 Dani Megert CLA 2012-11-05 11:12:14 EST
We use the OS settings. There are no plans to provide an option to override those. Most OSes offer to change the color. If your OS doesn't do this, then please request the feature there.
Comment 3 Em Recio CLA 2014-05-09 15:10:13 EDT
Why is this a "wont fix" you can override the background color of the javadoc view, but not the font color?? I can hardly read the text, and I /don't/ want to change the tooltip text for the entire system.
Comment 4 Dusan Velicky CLA 2016-06-29 16:35:45 EDT
This is probably the most frequent dialog inside editor along content assist and it doesn't have bg/fg colour controls. This is a serious UX issue that is bothering majority of people out of the box on Linux side.

Saying that OS should control tooltip windows (again most used thing in IDE) but at the same time provide colour controls inside IDE for everything else is really bad.   

People are wasting time

https://www.eclipse.org/forums/index.php/t/1069038/

Lars Vogel covered this at http://blog.vogella.com/2012/12/04/eclipse-papercut-10-eclipse-on-ubuntu-fixing-the-black-background-color-in-hover/

Stack overflow has many variations of this like this one

http://stackoverflow.com/questions/5380991/eclipse-hover-background-color-property-where 20K views

Circus continues with migration between GTK2 and GTK3 as old fixes stopped working

http://stackoverflow.com/questions/35082507/eclipse-mars-on-linux-black-background-color-in-tooltips

Can someone please elaborate on what components need to be changed for this and unfreeze this ticket?
Comment 5 Lars Vogel CLA 2016-06-29 16:39:17 EDT
Dusan, you are making good points. I think we should allow to configure the background color via CSS, as we do for the rest of the IDE.

I reopen the ticket for this purpose. Patches are welcome.
Comment 6 Lars Vogel CLA 2016-09-21 07:56:21 EDT
Added a few interested parties from Bug 500196.
Comment 7 Lars Vogel CLA 2016-09-21 07:57:09 EDT
Created attachment 264312 [details]
Screenshot
Comment 8 Lars Vogel CLA 2016-09-21 07:58:42 EDT
Created attachment 264313 [details]
Content Assists
Comment 9 Eric Williams CLA 2016-09-21 11:31:38 EDT
As far as the ToolTip widget is concerned on GTK: the background is set at creation to SWT.COLOR_INFO_BACKGROUND. AFAICT there is no background API for ToolTips since it's a child of Widget, not Control. 

This makes sense to me as SWT tooltips should look consistent depending on the OS colors.

(In reply to Em Recio from comment #3)
> Why is this a "wont fix" you can override the background color of the
> javadoc view, but not the font color?? I can hardly read the text, and I
> /don't/ want to change the tooltip text for the entire system.

The Javadocs view is *not* an SWT ToolTip. It is a Browser with restricted size and displays HTML content. At best it could be considered a "popup", but in reality it's a fully fledged widget that has been made to look like a ToolTip. Browsers have configurable background colors, ToolTips do not.

As for the Javadocs view/popup/hover, there are plans to allow for full background/foreground color configuration (see bug 5001960). However that discussion doesn't have anything to do with this bug, IMO.
Comment 10 Leo Ufimtsev CLA 2016-09-21 15:58:20 EDT
(In reply to comment #6)
> Added a few interested parties from Bug 500196.
Thank you for adding me to this relevant bug.

I'm in the process of fixing javadoc in Bug 500196. Should look nice after fix:
White:  https://bugs.eclipse.org/bugs/attachment.cgi?id=264152
Black:  https://bugs.eclipse.org/bugs/attachment.cgi?id=264151

But there are indeed elements of Eclipse that will still look a bit broken even with Javadoc fix. Ex heap status.
Comment 11 Em Recio CLA 2016-09-30 15:39:16 EDT
It is odd that this should pop up because i just came across this again with another eclipse based app from IBM. This is a major fail from the swt toolkit.
Comment 12 Leo Ufimtsev CLA 2016-10-03 09:28:45 EDT
(In reply to comment #11)
> It is odd that this should pop up because i just came across this again with
> another eclipse based app from IBM. This is a major fail from the swt toolkit.

Yea, unfortunately active Gtk3.0+ development broke a lot of stuff at a quick paste and fixing things took quite a while. But contributions are always welcome =).

I'll aim to backport the Javadoc changes once all the patches were merged into master and verified to work well, hopefully that should make the UI more readable.
Also, I've introduced a colorFactory in Bug 501742, which could be re-used for a bunch of black/white color related issues, which should hopefully make UI look nicer.
Comment 13 Lars Vogel CLA 2020-06-03 04:39:51 EDT
This one has been fixed in the meantime
Comment 14 Andrew Obuchowicz CLA 2020-06-03 09:25:26 EDT
(In reply to Lars Vogel from comment #13)
> This one has been fixed in the meantime

Do you happen to know what the css properties for the tooltip background color are? Or which bug fixed this?
Comment 15 Lars Vogel CLA 2020-06-03 09:49:39 EDT
(In reply to Andrew Obuchowicz from comment #14)
> (In reply to Lars Vogel from comment #13)
> > This one has been fixed in the meantime
> 
> Do you happen to know what the css properties for the tooltip background
> color are? Or which bug fixed this?

IIRC these popups were using hard-coded colors and after these have been removed the normal shell customization via CSS was used.
Comment 16 Andrew Obuchowicz CLA 2020-06-03 13:51:40 EDT
(In reply to Lars Vogel from comment #15)
> (In reply to Andrew Obuchowicz from comment #14)
> > (In reply to Lars Vogel from comment #13)
> > > This one has been fixed in the meantime
> > 
> > Do you happen to know what the css properties for the tooltip background
> > color are? Or which bug fixed this?
> 
> IIRC these popups were using hard-coded colors and after these have been
> removed the normal shell customization via CSS was used.

OK that makes sense with the behavior I've seen in my custom theme. Thanks.