[GTK3] Info bar text is really hard to read (light-gray-on-yellow) in default Ubuntu theme, even after bug 1187203




Widget: Gtk
2 years ago
7 months ago


(Reporter: dholbert, Unassigned)


(Blocks: 1 bug)

Dependency tree / graph

Firefox Tracking Flags

(firefox41 unaffected, firefox42 affected, firefox43 affected)



(7 attachments, 1 obsolete attachment)



2 years ago
Created attachment 8652084 [details]
screenshot of post-bug-1187203 rendering, showing light-gray-on-yellow

Bug 1187203 was filed on white-on-white infobar text.

Its patch improved things a bit, but on my system at least (running Ubuntu 15.04 with gnome-shell & default "Ambiance" theme), it's still noticeably hard to read.

See attached screenshot, which shows an  "[Add-on] might be making Nightly run slowly" in one Firefox window, and the top of an RSS feed* in a different Firefox window. Both have light-gray text on a yellow background, and look unnecessarily hard to read. The text looks like a disabled formcontrol, or something like that -- like it's there but not meant to be read.

* NOTE: To test RSS feeds [just one way of easily visualizing how this looks], you have to turn off e10s, since RSS rendering apparently doesn't work yet in e10s.

I'm using today's Nightly 43.0a1 (2015-08-24)

Comment 1

2 years ago
Created attachment 8652085 [details]
screenshot of Firefox 40 (current release), with white text on black background

For comparison, Firefox 40 (with GTK2) renders these sections with white text on a black background.

So, there's sharp contrast, and it's much easier to read (and much less "disabled"/"you-don't-want-to-read-me" looking) as compared to current release.


2 years ago
Attachment #8652084 - Attachment description: screenshot of post-bug-1187203 rendering → screenshot of post-bug-1187203 rendering, showing light-gray-on-yellow

Comment 2

2 years ago
Created attachment 8652093 [details]
testcase 1, using "-moz-gtk-info-bar" / " -moz-gtk-info-bar-text"

Here's a simple testcase, using the -moz-gtk-info-bar appearance and text-color that was added in bug 1187203.

In current Nightly, this renders like my first light-gray-on-yellow screenshot here.

Comment 3

2 years ago
Andrew, I'm not sure where the colors here come from -- is this another case where my theme is being silly? Or are these colors controlled by Gecko? (in which case, could we improve the contrast?)
Flags: needinfo?(acomminos)
Created attachment 8652100 [details]
GtkInfoBar example program

Ack, it's unfortunately quite likely to be your theme- the way we present the notification bars should styled identically to a GtkInfoBar with a GtkLabel in its content area.

Can you let me know if the attached program has difficult to read text as well? Thanks!
Flags: needinfo?(acomminos)

Comment 5

2 years ago
Created attachment 8652126 [details]
screenshot of GtkInfoBar example program on dholbert's system (gray on yellow)

Comment 6

2 years ago
Yeah, so Ambiance has:
  gtk-main.css:@define-color info_fg_color rgb (181, 171, 156);
  gtk-main.css:@define-color info_bg_color rgb (252, 252, 189);

..which is light-gray-on-yellow. The yellow ends up being used in a gradient expression (which we dutifully render now), and it ends up pretty unreadable, as shown in the screenshot of Andrew's example GTK program.

So, this is a bug in Ambiance, basically.  (And a more legitimate bug than the one I spun off of bug 1187203 -- in that case, Ambiance was just expecting that its background gradients would be rendered. Here, we are rendering them, and it's still unreadable.)

So I guess this is INVALID as a Firefox bug, unless we decide we want to use something other than a GTK InfoBar here (for our Firefox infobars) -- that would work around this on our end. (e.g. Before bug 1187203, it looked like we were trying [and not quite succeeding] to use GTK tooltip styling for our info-bars. If we decide to go back to using a tooltip under the hood, then that would get around this...)
Last Resolved: 2 years ago
Resolution: --- → INVALID
Duplicate of this bug: 1202538


2 years ago
status-firefox41: --- → unaffected
status-firefox42: --- → affected

Comment 8

2 years ago
Created attachment 8662972 [details]
Linux Mint screenshot

On Linux Mint the colors are white text on gray background.
Is someone filing a bug  in the relevant external project?

Comment 9

2 years ago
(In reply to Christian Ascheberg from comment #8)
> On Linux Mint the colors are white text on gray background.

Yikes, that is horrible.

> Is someone filing a bug  in the relevant external project?

Could you please do so (for Linux Mint)? I don't have Linux Mint and I don't know where to file bugs for its themes. (You may not either, but you're in a better position than I am to report bugs to them, since you're a user.)

Answering your question -- in the case of my screenshots here, I haven't bothered to report an upstream bug because:
 (1) The text is actually readable, though just a bit annoying. So, not a deal-breaker.
 (2) The theme is behaving as-designed, as shown by acomminos' trivial demo-program. (This isn't a Firefox-specific issue in any way.)
 (3) I doubt an Ubuntu bug will get traction. I filed an upstream bug* for the more-severe & easier-to-fix bug 1478173, with a patch, and it still hasn't gotten any comments 2 months later. (Just one comment from a 3rd-party theme developer that I reached out to separately via email).  So, given that this bug is less-bad (on Ubuntu's theme), and possibly working how the theme designer intended, and it's not as obvious how to fix (gotta pick a new color, what color?), I have doubts that an upstream bug would have any effect.

* https://bugs.launchpad.net/ubuntu/+source/ubuntu-themes/+bug/1478173

Comment 10

2 years ago
Created attachment 8663274 [details]
Linux Mint screenshot

Hmm I compiled the GtkInfoBar example program and there the text is black. So could it still be a bug in Firefox?
Attachment #8662972 - Attachment is obsolete: true

Comment 11

2 years ago
That sounds like it could be a bug, then. Could you file a new bug on this Mint-specific issue [which it seems could be a Firefox bug], with that screenshot, and CC acomminos and karlt?


2 years ago
See Also: → bug 1209343


9 months ago
Blocks: 1320883
Created attachment 8825202 [details]
Ambiance 14.04 info bar colors

This presents the colors we would get from Ambiance on Ubuntu 14.04 if we were to consider using different message types, if appropriate.

However, the only one which has helpful contrast is the error bar, and IMO that is too striking for most notifications.


7 months ago
See Also: → bug 1329740
You need to log in before you can comment on or make changes to this bug.