make setStyle() recursive
Dana Jansens danakj@orodu.net
2 files changed,
12 insertions(+),
1 deletions(-)
M
otk/widget.cc
→
otk/widget.cc
@@ -420,6 +420,17 @@ if (it != _children.end())
_children.erase(it); } +void OtkWidget::setStyle(Style *style) +{ + assert(style); + _style = style; + _dirty = true; + OtkWidgetList::iterator it, end = _children.end(); + for (it = _children.begin(); it != end; ++it) + (*it)->setStyle(style); +} + + void OtkWidget::setEventDispatcher(OtkEventDispatcher *disp) { if (_event_dispatcher)
M
otk/widget.hh
→
otk/widget.hh
@@ -101,7 +101,7 @@ inline Direction getDirection(void) const { return _direction; }
void setDirection(Direction dir) { _direction = dir; } inline Style *getStyle(void) const { return _style; } - virtual void setStyle(Style *style) { assert(style); _style = style; } + virtual void setStyle(Style *style); inline OtkEventDispatcher *getEventDispatcher(void) { return _event_dispatcher; }