setStyle in the constructor of each child widget
authorDana Jansens <danakj@orodu.net>
Mon, 27 Jan 2003 19:11:09 +0000 (19:11 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 27 Jan 2003 19:11:09 +0000 (19:11 +0000)
otk/button.cc
otk/focuslabel.hh
otk/label.cc
otk/widget.cc

index e7340d1..08dc048 100644 (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()
index eca8fff..ec19471 100644 (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);
   
index 41e5cd1..bb8083a 100644 (file)
@@ -11,6 +11,7 @@ namespace otk {
 Label::Label(Widget *parent)
   : Widget(parent), _text("")
 {
+  setStyle(_style);
 }
 
 Label::~Label()
index 69a8623..b0fe7ec 100644 (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()