all repos — openbox @ 7dc834cc93efb9a4181ba7d29a72d49e596e9746

openbox fork - make it a bit more like ryudo

make setStyle() recursive
Dana Jansens danakj@orodu.net
commit

7dc834cc93efb9a4181ba7d29a72d49e596e9746

parent

772ff27864b724c884ca5681fedc42711c63ec82

2 files changed, 12 insertions(+), 1 deletions(-)

jump to
M otk/widget.ccotk/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.hhotk/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; }