all repos — openbox @ 9999922623158c296ce5485f7416103cdef863ca

openbox fork - make it a bit more like ryudo

setStyle in the constructor of each child widget
Dana Jansens danakj@orodu.net
commit

9999922623158c296ce5485f7416103cdef863ca

parent

f55419c19bd4ceee2d6e2994e02e0336bba027b4

4 files changed, 3 insertions(+), 3 deletions(-)

jump to
M otk/button.ccotk/button.cc

@@ -12,6 +12,7 @@ Button::Button(Widget *parent)

: FocusLabel(parent), _pressed(false), _pressed_focus_tx(0), _pressed_unfocus_tx(0), _unpr_focus_tx(0), _unpr_unfocus_tx(0) { + setStyle(_style); } Button::~Button()
M otk/focuslabel.hhotk/focuslabel.hh

@@ -16,7 +16,7 @@

inline const ustring &getText(void) const { return _text; } void setText(const ustring &text) { _text = text; _dirty = true; } - virtual void renderForeground(void); + virtual void renderForeground(); virtual void setStyle(RenderStyle *style);
M otk/label.ccotk/label.cc

@@ -11,6 +11,7 @@

Label::Label(Widget *parent) : Widget(parent), _text("") { + setStyle(_style); } Label::~Label()
M otk/widget.ccotk/widget.cc

@@ -32,7 +32,6 @@ assert(parent);

parent->addChild(this); create(); _event_dispatcher->registerHandler(_window, this); - setStyle(_style); // let the widget initialize stuff } Widget::Widget(EventDispatcher *event_dispatcher, RenderStyle *style,

@@ -53,7 +52,6 @@ assert(event_dispatcher);

assert(style); create(override_redirect); _event_dispatcher->registerHandler(_window, this); - setStyle(_style); // let the widget initialize stuff } Widget::~Widget()