summaryrefslogtreecommitdiff
path: root/plugingui/widget.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-03-30 17:44:20 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2013-03-30 17:44:20 +0100
commit4b7414b3f6869f2bdeb097e4f997498bae9f0aee (patch)
tree53e9741d7d40f1ff6f77d47fc308b18168dca330 /plugingui/widget.cc
parenta1fba9ba11a13f94c524f2ac78206b3fdfb3be74 (diff)
New box rendering of all widgets. Minor tweaks still missing.
Diffstat (limited to 'plugingui/widget.cc')
-rw-r--r--plugingui/widget.cc13
1 files changed, 2 insertions, 11 deletions
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; }