aboutsummaryrefslogtreecommitdiff
path: root/dw/widget.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-10-11 21:56:57 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-10-11 21:56:57 +0200
commitb8591b41fda0567721b024059f9b4497e3d259e4 (patch)
tree9665355768ab119bfd09504f00704cc3ade494dd /dw/widget.cc
parentd3a9a4185e26638c7b6d512b8351d68a8c55c86e (diff)
parenta6cf69ecca7f17838f551a2983e2277440ec3f0d (diff)
merge
Diffstat (limited to 'dw/widget.cc')
-rw-r--r--dw/widget.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/dw/widget.cc b/dw/widget.cc
index fb0d29e0..ee8cb17c 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -302,8 +302,6 @@ void Widget::setStyle (style::Style *style)
this->style = style;
if (layout != NULL) {
- if (parent == NULL)
- layout->updateBgColor ();
layout->updateCursor ();
}
@@ -339,9 +337,7 @@ style::Color *Widget::getBgColor ()
widget = widget->parent;
}
- MSG_WARN("No background color found!\n");
- return NULL;
-
+ return layout->getBgColor ();
}
@@ -399,7 +395,9 @@ void Widget::drawWidgetBox (View *view, Rectangle *area, bool inverse)
* widget->style->background_color is NULL (shining through).
*/
/** \todo Background images? */
- if (parent && style->backgroundColor)
+
+ if (style->backgroundColor &&
+ (parent || layout->getBgColor () != style->backgroundColor))
style::drawBackground (view, &viewArea, allocation.x, allocation.y,
allocation.width, getHeight (), style, inverse);
}