After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679404 - Read colors for message preview from Gtk theme
Read colors for message preview from Gtk theme
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.6.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[webkit]
Depends on:
Blocks:
 
 
Reported: 2012-07-04 15:49 UTC by Tobias Wolf
Modified: 2013-09-13 01:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Black text in HTML mail (15.45 KB, image/png)
2012-07-04 15:49 UTC, Tobias Wolf
  Details
Correct text color for text/plain (16.33 KB, image/png)
2012-07-04 15:50 UTC, Tobias Wolf
  Details
Impossible to determine the color displayed on that swatch (153.49 KB, image/png)
2012-07-16 16:57 UTC, Tobias Wolf
  Details
Patch (3.77 KB, patch)
2012-07-17 13:28 UTC, Dan Vrátil
needs-work Details | Review
Fixed patch (4.80 KB, patch)
2012-07-19 09:05 UTC, Dan Vrátil
needs-work Details | Review
Fixed patch (5.03 KB, patch)
2012-07-24 09:42 UTC, Dan Vrátil
committed Details | Review

Description Tobias Wolf 2012-07-04 15:49:56 UTC
Created attachment 218021 [details]
Black text in HTML mail

In between Evolution 3.4.3 and Evolution 3.5.3 the color of mail headers and HTML mail body text switched from being context sensitive to all-black. 

Before, the text was white on gray (it still is for plain text email), now it is black on gray.
Comment 1 Tobias Wolf 2012-07-04 15:50:59 UTC
Created attachment 218022 [details]
Correct text color for text/plain
Comment 2 Tobias Wolf 2012-07-16 16:57:10 UTC
Created attachment 218934 [details]
Impossible to determine the color displayed on that swatch
Comment 3 Tobias Wolf 2012-07-16 16:58:06 UTC
aklapper wrote in Bug #679810
> > - the Evolution fg color for HTML mails should be filed against Evolution
> 
> In case you plan to file a separate ticket, please include information if that
> specific HTML message uses CSS for defining colors. If it does, please retest
> with unstable experimental Evolution version 3.5.x if possible.
> CSS has never been supported before version 3.5 (which now uses WebKit instead
> of ancient GtkHtml for rendering HTML messages).
> Also please include your color setting under "Edit > Preferences > Mail
> Preferences > General > Message Display > Highlight quotations with color".

Too late. 

I tested 3.5.3 and there is no css in the message, just old-skool HTML. The
email headers are also black.

I cannot determine the quoting color because the new color choosing widget is
super-dysfunctional. There’s no way to see what the selected color was. Another
thing that was broken and fell by the wayside because in modern day Gnome a
user with an insight is ignored. I cannot even use an eye dropper from that
dialog on the swatch, because the eye dropper was also removed. I filed this
before. Anyway, it’s light gray.
Comment 4 Dan Vrátil 2012-07-17 13:28:51 UTC
Created attachment 219020 [details] [review]
Patch 

Set HTML text color from GtkStyle and remove some hardcoded text colors from CSS (to fix font colors in itip-view).
Comment 5 Milan Crha 2012-07-18 11:43:45 UTC
Patch looks good and mostly works, except of:
a) "Retrieving message 'a'" is still black text on white background, which in
   dark theme makes it flashing horribly
b) link color in dark theme is too dark, it's like Navy (dark blue), making
   email addresses effectively unreadable

You also mention GtkStyle, it's deprecated these days, maybe reading colors from GtkStyleContext will fix b) on its own?
Comment 6 Dan Vrátil 2012-07-18 12:07:32 UTC
(In reply to comment #5)
> b) link color in dark theme is too dark, it's like Navy (dark blue), making
>    email addresses effectively unreadable

My link color is based on theme settings. Maybe your dark theme just have too low contrast?

> 
> You also mention GtkStyle, it's deprecated these days, maybe reading colors
> from GtkStyleContext will fix b) on its own?

I checked both GtkStyle and GtkStyleContext docs but haven't found any way to get link colors...
Comment 7 Milan Crha 2012-07-18 20:20:30 UTC
OK, I tried with gtk3-demo on Hypertext and the link color doesn't seem to change, thus just let it be as is. I'm sorry for the noise with links.
Comment 8 Dan Vrátil 2012-07-19 09:05:35 UTC
Created attachment 219203 [details] [review]
Fixed patch

Fixes colors of "Retrieving message..." status message.
Comment 9 Milan Crha 2012-07-23 17:06:33 UTC
There is missing link color in e_mail_display_set_status(), leading to crash.
Comment 10 Milan Crha 2012-07-23 17:08:58 UTC
while not use link color in e_mail_formatter_get_html_header()? It makes more sense there, as "status" is just a message string.
Comment 11 Dan Vrátil 2012-07-24 09:42:57 UTC
Created attachment 219563 [details] [review]
Fixed patch

Interesting that it never crashed for me due to the missing color. Using e_mail_formatter_get_html_header() now.
Comment 12 Milan Crha 2012-07-24 15:34:34 UTC
Much better, thanks. One more thing, though:
- selecting account node shows the empty preview panel as white rectangle

Please fix that and commit. Thanks.
Comment 13 Milan Crha 2012-07-24 15:46:10 UTC
Oh, it is playing only with mailer, what about Contacts, Tasks and Memos view?
Comment 14 Dan Vrátil 2012-07-26 14:08:46 UTC
(In reply to comment #12)
> - selecting account node shows the empty preview panel as white rectangle

It displays empty document (without any HTML). WebKit does not apprently respect GtkStyle and renders empty canvas in white background.

(In reply to comment #13)
> Oh, it is playing only with mailer, what about Contacts, Tasks and Memos view?

I considered other modules out of scope of this bug. Feel free to test it and open a new bug if it does not work there.
Comment 15 Milan Crha 2012-07-26 17:14:00 UTC
(In reply to comment #14)
> (In reply to comment #12)
> > - selecting account node shows the empty preview panel as white rectangle
> 
> It displays empty document (without any HTML). WebKit does not apprently
> respect GtkStyle and renders empty canvas in white background.

I suppose passing empty HTML with colors set will make it for us. Please do that and commit.

> (In reply to comment #13)
> > Oh, it is playing only with mailer, what about Contacts, Tasks and Memos view?
> 
> I considered other modules out of scope of this bug. Feel free to test it and
> open a new bug if it does not work there.

Evil bug #680666 filled.
Comment 16 Dan Vrátil 2012-07-27 10:14:30 UTC
Comment on attachment 219563 [details] [review]
Fixed patch


Committed to git master as 440e43d

http://git.gnome.org/browse/evolution/commit/?id=440e43d2894fdd517cc91302d4364b082e7d1d8b