From 9999922623158c296ce5485f7416103cdef863ca Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 27 Jan 2003 19:11:09 +0000 Subject: [PATCH] setStyle in the constructor of each child widget --- otk/button.cc | 1 + otk/focuslabel.hh | 2 +- otk/label.cc | 1 + otk/widget.cc | 2 -- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/otk/button.cc b/otk/button.cc index e7340d1b..08dc0484 100644 --- a/otk/button.cc +++ b/otk/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() diff --git a/otk/focuslabel.hh b/otk/focuslabel.hh index eca8fff1..ec194712 100644 --- a/otk/focuslabel.hh +++ b/otk/focuslabel.hh @@ -16,7 +16,7 @@ public: 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); diff --git a/otk/label.cc b/otk/label.cc index 41e5cd14..bb8083ab 100644 --- a/otk/label.cc +++ b/otk/label.cc @@ -11,6 +11,7 @@ namespace otk { Label::Label(Widget *parent) : Widget(parent), _text("") { + setStyle(_style); } Label::~Label() diff --git a/otk/widget.cc b/otk/widget.cc index 69a86237..b0fe7ec8 100644 --- a/otk/widget.cc +++ b/otk/widget.cc @@ -32,7 +32,6 @@ Widget::Widget(Widget *parent, Direction direction) 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 @@ Widget::Widget(EventDispatcher *event_dispatcher, RenderStyle *style, assert(style); create(override_redirect); _event_dispatcher->registerHandler(_window, this); - setStyle(_style); // let the widget initialize stuff } Widget::~Widget() -- 2.39.2