summaryrefslogtreecommitdiff
path: root/plugingui/listbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/listbox.cc')
-rw-r--r--plugingui/listbox.cc28
1 files changed, 5 insertions, 23 deletions
diff --git a/plugingui/listbox.cc b/plugingui/listbox.cc
index 9602bc8..ba61424 100644
--- a/plugingui/listbox.cc
+++ b/plugingui/listbox.cc
@@ -38,30 +38,11 @@ ListBox::ListBox(Widget *parent)
, valueChangedNotifier(basic.valueChangedNotifier)
, basic(this)
{
- box.topLeft = new Image(":widget_tl.png");
- box.top = new Image(":widget_t.png");
- box.topRight = new Image(":widget_tr.png");
- box.left = new Image(":widget_l.png");
- box.right = new Image(":widget_r.png");
- box.bottomLeft = new Image(":widget_bl.png");
- box.bottom = new Image(":widget_b.png");
- box.bottomRight = new Image(":widget_br.png");
- box.center = new Image(":widget_c.png");
-
- basic.move(box.left->width(), box.top->height());
+ basic.move(7, 7);
}
ListBox::~ListBox()
{
- 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 ListBox::addItem(std::string name, std::string value)
@@ -112,14 +93,15 @@ void ListBox::repaintEvent(RepaintEvent* repaintEvent)
return;
}
- p.drawBox(0, 0, box, w, h);
+ box.setSize(w, h);
+ p.drawImage(0, 0, box);
}
void ListBox::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 - (7 + 7),
+ height - (7 + 7));
}
} // GUI::