diff options
Diffstat (limited to 'plugingui/listboxthin.cc')
-rw-r--r-- | plugingui/listboxthin.cc | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/plugingui/listboxthin.cc b/plugingui/listboxthin.cc index 03b2594..5d8ab49 100644 --- a/plugingui/listboxthin.cc +++ b/plugingui/listboxthin.cc @@ -29,7 +29,8 @@ #include "painter.h" #include "font.h" -namespace GUI { +namespace GUI +{ ListBoxThin::ListBoxThin(Widget *parent) : Widget(parent) @@ -38,30 +39,11 @@ ListBoxThin::ListBoxThin(Widget *parent) , valueChangedNotifier(basic.valueChangedNotifier) , basic(this) { - box.topLeft = new Image(":thinlistbox_tl.png"); - box.top = new Image(":thinlistbox_t.png"); - box.topRight = new Image(":thinlistbox_tr.png"); - box.left = new Image(":thinlistbox_l.png"); - box.right = new Image(":thinlistbox_r.png"); - box.bottomLeft = new Image(":thinlistbox_bl.png"); - box.bottom = new Image(":thinlistbox_b.png"); - box.bottomRight = new Image(":thinlistbox_br.png"); - box.center = new Image(":thinlistbox_c.png"); - - basic.move(box.left->width(), box.top->height()); + basic.move(1, 1); } ListBoxThin::~ListBoxThin() { - delete box.topLeft; - delete box.top; - delete box.topRight; - delete box.left; - delete box.right; - delete box.bottomLeft; - delete box.bottom; - delete box.bottomRight; - delete box.center; } void ListBoxThin::addItem(std::string name, std::string value) @@ -107,14 +89,15 @@ void ListBoxThin::repaintEvent(RepaintEvent* repaintEvent) return; } - p.drawBox(0, 0, box, w, h); + box.setSize(w,h); + p.drawImage(0, 0, box); } void ListBoxThin::resize(int width, int height) { Widget::resize(width, height); - basic.resize(width - (box.left->width() + box.right->width()), - height - (box.top->height() + box.bottom->height())); + basic.resize(width - (1 + 1), + height - (1 + 1)); } } // GUI:: |