diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-11-07 10:39:46 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-11-07 10:39:46 +0100 |
commit | a65ca7af57feaf7a4ea73f7e071a72eb9b3a1e24 (patch) | |
tree | 6cf9fa3b8b57513b8eae030bdc6e1a18495d7e75 /plugingui/widget.cc | |
parent | 60109b8a737059058d2b0664c7ea88ec501490f7 (diff) |
Refactored Painter.
Diffstat (limited to 'plugingui/widget.cc')
-rw-r--r-- | plugingui/widget.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugingui/widget.cc b/plugingui/widget.cc index 65d269b..6106f7c 100644 --- a/plugingui/widget.cc +++ b/plugingui/widget.cc @@ -35,15 +35,17 @@ namespace GUI { Widget::Widget(Widget *parent) : pixbuf(1, 1) + , parent(parent) + , _window(nullptr) { _width = _height = 10; - this->parent = parent; if(parent) { parent->addChild(this); _window = parent->window(); } + _width = _height = 0; _visible = true; } @@ -173,7 +175,7 @@ Window *Widget::window() void Widget::repaint_r(RepaintEvent *e) { - Painter p(this); // make sure pixbuf refcount is incremented. + Painter p(*this); // make sure pixbuf refcount is incremented. repaintEvent(e); |