summaryrefslogtreecommitdiff
path: root/src/styleengine.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-11 15:19:34 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-03-11 15:19:34 +0100
commit112f08e866855947f24a61c3478e6223075a9f78 (patch)
tree026703177013b8f39e8466820995f92fe56a29d1 /src/styleengine.cc
parent4e01778e8809cf66e101064f969775568958fa03 (diff)
fix allow_white_bg=NO case
This is not perfect, as the replacement color is hardcoded to 0xdcd1ba.
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r--src/styleengine.cc8
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 =