GNOME Bugzilla – Bug 781309
Signature and import previews hard to read with dark theme
Last modified: 2017-07-04 10:48:39 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
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?
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.
*** Bug 782369 has been marked as a duplicate of this bug. ***
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+)