diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-11 15:19:34 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-11 15:19:34 +0100 |
commit | 112f08e866855947f24a61c3478e6223075a9f78 (patch) | |
tree | 026703177013b8f39e8466820995f92fe56a29d1 /src | |
parent | 4e01778e8809cf66e101064f969775568958fa03 (diff) |
fix allow_white_bg=NO case
This is not perfect, as the replacement color is hardcoded to 0xdcd1ba.
Diffstat (limited to 'src')
-rw-r--r-- | src/styleengine.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc index e05630bd..ba7700ea 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -291,8 +291,12 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { switch (p->name) { /* \todo missing cases */ case CSS_PROPERTY_BACKGROUND_COLOR: - attrs->backgroundColor = - Color::create (layout, p->value.intVal); + if (!prefs.allow_white_bg && p->value.intVal == 0xffffff) + attrs->backgroundColor = + Color::create (layout, 0xdcd1ba); + else + attrs->backgroundColor = + Color::create (layout, p->value.intVal); break; case CSS_PROPERTY_BORDER_TOP_COLOR: attrs->borderColor.top = |