Enforce monospace font elements separately
Fixes: https://bugs.launchpad.net/bugs/888814
This commit is contained in:
parent
7cf7dea9ee
commit
ed5561567b
1 changed files with 7 additions and 2 deletions
|
@ -1551,10 +1551,15 @@ midori_web_settings_set_property (GObject* object,
|
||||||
{
|
{
|
||||||
gchar* font_family = katze_object_get_string (web_settings,
|
gchar* font_family = katze_object_get_string (web_settings,
|
||||||
"default-font-family");
|
"default-font-family");
|
||||||
gchar* css = g_strdup_printf ("* { font-family: %s !important; }",
|
gchar* monospace = katze_object_get_string (web_settings,
|
||||||
font_family);
|
"monospace-font-family");
|
||||||
|
gchar* css = g_strdup_printf ("body * { font-family: %s !important; } \
|
||||||
|
code, code *, pre, pre *, blockquote, blockquote *, \
|
||||||
|
input, textarea { font-family: %s !important; }",
|
||||||
|
font_family, monospace);
|
||||||
midori_web_settings_add_style (web_settings, "enforce-font-family", css);
|
midori_web_settings_add_style (web_settings, "enforce-font-family", css);
|
||||||
g_free (font_family);
|
g_free (font_family);
|
||||||
|
g_free (monospace);
|
||||||
g_free (css);
|
g_free (css);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue