Open Bug 1268241 Opened 4 years ago Updated 3 years ago

tooltips display with unreadable colors

Categories

(Core :: Widget: Gtk, defect, P3)

46 Branch
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: wxl, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: tpi:+)

Attachments

(5 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.49 Safari/537.36

Steps to reproduce:

1. Go to some site with a tooltip (e.g. http://www.htdp.org/)
2. Mouseover the location of the tooltip (e.g. the image at http://www.htdp.org/)


Actual results:

Tooltip displays with unreadable text. Seems to be like blue-grey on grey or something of the sort. Something where the text color and the background color are nearly identical.


Expected results:

Tooltip displays with readable text.

I honestly can't remember what it was with 45 (grey on black?), but it behaved nicely until I got 46. 47 shows the same problem.

FWIW I'm running this in Kubuntu 14.04.4 i386. I'm using versions in the repos except that 47 came from the Mozilla Build Team PPA.
Blocks: gtk3
Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64
Can you tell me please whether the GTK3 theme is oxygen-gtk?

How do tooltips compare to another GTK3 app?
e.g hover on the "link button" of gtk3-widget-factory.
(In reply to Karl Tomlinson (ni?:karlt) from comment #1)
> Can you tell me please whether the GTK3 theme is oxygen-gtk?

Looking at ~/.config/gtk-3.0/settings.ini, I find:
gtk-theme-name=oxygen-gtk
gtk-icon-theme-name= oxygen
gtk-fallback-icon-theme=oxygen

tl;dr yes ;)

FWIW this is with libgtk 3.10.8-0.ubuntu1.6.

> How do tooltips compare to another GTK3 app?
> e.g hover on the "link button" of gtk3-widget-factory.

The tooltip looks fine, actually.

It's hard to tell, but the gradients seem similar, but the text color and shape of the tooltip itself is different:
https://i.imgur.com/HGycFm8.png

I should mention that a reasonable workaround is a chrome/userChrome.css like so:
   tooltip { padding: 0px !important; }
   tooltip * {
     color: black !important;
     padding: 2px 5px 3px 5px !important;
   }
which is to say it seems to be the font color that's the issue.
Flags: needinfo?(karlt)
The text color may be the same issue as https://bugzilla.mozilla.org/show_bug.cgi?id=1250704#c9.  Gecko should do better there.

I don't have any guesses why the shape would be different.
Flags: needinfo?(karlt)
Priority: -- → P1
See Also: → 1250704
See Also: → 1270176
Blocks: 1270176
Whiteboard: tpi:+
Currently, I am using Firefox last beta version 49.0b10 in Xubuntu 14.04 32bit. I resolved this issue on Aug 23 as follows:

Created a /home/user/.gtkrc-2.0 file and pasted the following code:

style "custom-tooltip"
{
  bg[NORMAL] = "#C6F6D1"
  fg[NORMAL] = "#000000"
}
widget "gtk-tooltips" style "custom-tooltip"

gtk-menu-popup-delay = 0 
gtk-menu-popdown-delay = 0 
gtk-menu-bar-popup-delay = 0 
gtk-enable-animations = 0 
gtk-timeout-expand = 0
gtk-timeout-initial = 0
gtk-timeout-repeat = 0
 
Then, I edited /usr/share/themes/Greybird/gtk-2.0/gtkrc and modified the tooltip line as follows:
gtk-color-scheme	= "tooltip_bg_color:#ffffff\ntooltip_fg_color:#000000" # Tooltips.

The settings in both files were set to black characters on white background. I don't know which has made the change and I don't really care because I needed the tooltip info, but it works for me.
Installed Xubuntu 16.04 and sadly, the solution doesn't work with gtk3.0.
displays tooltip bubble working on FF 50.0b2
displays desktop 32 bit Firefox 50.0b1 where the tooltip bubble is still black on black
Comment on attachment 8795993 [details]
tooltip bubble on 32bit FF.jpg

The 32 bit is FF 50.b2, and it's a desktop
Some themes create black on black as well.
I'm now seeing sensible colors with oxygen-gtk3 1.4.1 and gtk+ 3.18.9.
Similarly with gtk3-engines-oxygen_1.3.5-0ubuntu1_amd64.deb and
libgtk-3-0_3.10.8-0ubuntu1.6_amd64.deb.
The shapes are still not right.
Priority: P1 → P3
ineuw01, can you indicate please which GTK theme is used for your screenshots from Xubuntu 16.04?
Flags: needinfo?(ineuw01)
Just retested all the themes. These six GTK themes show the tooltip in Firefox as black on black.
Adwaita
Bluebird
Greybird
High Contrast
Numix
Numix Daily 

Raleigh is the only one that shows a legible tooltip with #F0DC9B background and #000000 foreground. There are serious clarity issue with Greybird: http://www.picfront.org/d/9svY but his is not a Firefox problem. Also, do not understand what you mean by "shapes".
(In reply to ineuw01 from comment #12)
> Just retested all the themes. These six GTK themes show the tooltip in
> Firefox as black on black.
> Adwaita

With Adwaita and libgtk 3.18.9 (which should be the same as on Ubuntu 16.04 if Ubuntu has no customizations), tooltips are light text on dark background for me with Firefox 50.0b3 and Nightly.

Can you reproduce with a clean Firefox profile and no GTK3 user CSS?
(In reply to Karl Tomlinson (:karlt) from comment #13)
> (In reply to ineuw01 from comment #12)
> > Just retested all the themes. These six GTK themes show the tooltip in
> > Firefox as black on black.
> > Adwaita
> 
> With Adwaita and libgtk 3.18.9 (which should be the same as on Ubuntu 16.04
> if Ubuntu has no customizations), tooltips are light text on dark background
> for me with Firefox 50.0b3 and Nightly.
> 
> Can you reproduce with a clean Firefox profile and no GTK3 user CSS?

I am using Xubuntu 16.04 and Firefox 50.b08. I have another admin account and I use it for testing (there is no user CSS). It is in this account I opened the factory fresh Firefox with default settings. I got the same results as you, white foreground on a charcoal background, Also the tooltip is the same white on charcoal with all my above listed styles. Except with Numix, the Firefox tabs are black foreground on the same charcoal background as the tooltip. The Numix menu bar is white foreground on the same charcoal  background It seems that the charcoal background is uniform. It seems that the color definitions of the CSS are screwed up.
Flags: needinfo?(ineuw01)
I am using Xubuntu 16.10. and tried both Firefox stable(50.1) and Aurora (51.0a2) with the Xubuntu Greybird theme.
If I change the theme configuration for the menu background and text colours Firefox only applies the change for the background, but not for the text colour.
You need to log in before you can comment on or make changes to this bug.