diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-27 19:11:09 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-27 19:11:09 +0000 |
| commit | 9999922623158c296ce5485f7416103cdef863ca (patch) | |
| tree | 71b48c2a26f3db1fb70167af1018c42c47cbadf0 | |
| parent | f55419c19bd4ceee2d6e2994e02e0336bba027b4 (diff) | |
setStyle in the constructor of each child widget
| -rw-r--r-- | otk/button.cc | 1 | ||||
| -rw-r--r-- | otk/focuslabel.hh | 2 | ||||
| -rw-r--r-- | otk/label.cc | 1 | ||||
| -rw-r--r-- | 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() |
