[Evolution-hackers] libgtkhtml: themes: option to ignore colors from HTML



Hi,

When displaying HTML message content, colors that are not explicitly
defined in the message HTML code itself are taken from the GTK theme,
the rest are taken from the message. The combination may be unreadable,
e.g. white-on-white text. I've looked at libgtkhtml 4.4.4 and Evolution
3.4.4. If new versions already deal with this, please ignore the rest.

One way to deal with it might be to give the consumer of GtkHTML widget
the option to ignore any colors defined in the HTML code. This seems to
be what Firefox is doing (judging from experience and the checkbox:
'Allow pages to choose their own colors'). The
HTMLSettings.forceDefaults in libgtkhtml appears to be exactly this.
However, it ignores the colors in attributes but not in styles. I've
patched it to ignore both (attached) and am now happy with Xfce-darkness
theme*.

For a complete patch, I guess, the forceDefaults flag would need to be
exposed as a widget property, and then as a gconf setting in Evolution.
But, before sinking any more time into this, is this of any interest
(esp. given the move to WebKit)?

[*] https://github.com/vkuzel/Xfce-darkness
The theme had to be patched with:
GtkHTML {
    color: @fg_normal;
    background-color: @bg_normal;
}

-alexei

Attachment: force-default.patch
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]