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 781309 - Signature and import previews hard to read with dark theme
Signature and import previews hard to read with dark theme
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Shell
3.22.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
: 782369 (view as bug list)
Depends on:
Blocks: 782369
 
 
Reported: 2017-04-14 11:01 UTC by Christian Stadelmann
Modified: 2017-07-04 10:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (2.94 KB, patch)
2017-04-28 10:21 UTC, Tomas Popela
none Details | Review

Description Christian Stadelmann 2017-04-14 11:01:44 UTC
Steps to reproduce:
1. change your default Gtk+ theme to Adwaita:dark, e.g. through gnome-tweak-tool or by using GtkInspector.
2. open evolution
3. open preferences, "Composer Preferences", "Signatures"
4. look at the signature text (EMailSignaturePreview widget)

What happens:
Signature preview is drawn with black font on dark gray background

What should happen:
Signature should be drawn in light gray on dark gray (same as composer) or black on white. How about reusing the composer component here, but making it non-editable?

Used software versions:
gtk3-3.22.11-1.fc25.x86_64
evolution-3.22.6-2.fc25.x86_64
Comment 1 Milan Crha 2017-04-19 12:53:19 UTC
Thanks for a bug report. I looked in the code briefly and the signature preview uses the same widget as the message preview, which is fine, but it doesn't use the color hints, neither EMailFormatter is involved. I do not know how much work it would mean to let it do it, though. Maybe not that hard for plain text signatures, but HTML and eventually also script signatures can be a problem. Note that the message preview sets default background color for HTML messages as white, not black/dark.

Tomas, do you have any idea, please?
Comment 2 Tomas Popela 2017-04-28 10:21:02 UTC
Created attachment 350625 [details] [review]
Proposed patch

This is the simple approach that I took:

Add a construct only property that specifies whether the web view should
automatically update its colors regarding to the current theme. Disable
it for the signature preview widget so the signatures are readable with
the dark theme.

Milan has some comments about it so I'm attaching it here.
Comment 3 Milan Crha 2017-07-04 10:30:07 UTC
*** Bug 782369 has been marked as a duplicate of this bug. ***
Comment 4 Milan Crha 2017-07-04 10:48:23 UTC
I took a little different approach, which also fixes the previews of calendar and contacts, where the preview is shown before the web extension is loaded, which makes the update_styles_cb() not being called at all. It's not the only change here, there are more things fixed it it.

Created commit 40184d3 in evo master (3.25.4+)
Created commit 3efc5d4 in evo gnome-3-24 (3.24.4+)