setStyle in the constructor of each child widget

This commit is contained in:
Dana Jansens 2003-01-27 19:11:09 +00:00
parent f55419c19b
commit 9999922623
4 changed files with 3 additions and 3 deletions

View file

@ -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()

View file

@ -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);

View file

@ -11,6 +11,7 @@ namespace otk {
Label::Label(Widget *parent)
: Widget(parent), _text("")
{
setStyle(_style);
}
Label::~Label()

View file

@ -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()