From 4b7414b3f6869f2bdeb097e4f997498bae9f0aee Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 30 Mar 2013 17:44:20 +0100 Subject: New box rendering of all widgets. Minor tweaks still missing. --- plugingui/widget.cc | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'plugingui/widget.cc') diff --git a/plugingui/widget.cc b/plugingui/widget.cc index eb7b0b6..7d79859 100644 --- a/plugingui/widget.cc +++ b/plugingui/widget.cc @@ -89,8 +89,9 @@ void GUI::Widget::removeChild(GUI::Widget *widget) } } -void GUI::Widget::resize(size_t width, size_t height) +void GUI::Widget::resize(int width, int height) { + if(width < 1 || height < 1) return; _width = width; _height = height; pixbuf.realloc(width, height); @@ -100,16 +101,6 @@ void GUI::Widget::move(size_t x, size_t y) { _x = x; _y = y; - /* - Widget *p = parent; - while(p) { - x += p->pixbuf.x; - y += p->pixbuf.y; - p = p->parent; - } - */ - // pixbuf.x = x; - // pixbuf.y = y; } size_t GUI::Widget::x() { return _x; } -- cgit v1.2.3