summaryrefslogtreecommitdiff
path: root/plugingui/listboxthin.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-06-07 22:21:47 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-06-07 22:21:47 +0200
commitcb51ef44e8f3b6461e608171eb3468bc15a696da (patch)
tree6fabacaa283323034dc6dbd11acd0082f65cac82 /plugingui/listboxthin.cc
parent7a5ede33b58b8935ce33c5363f7d500ba8663c63 (diff)
Update all use of thinlistbox_*.png to new TexturedBox.
Diffstat (limited to 'plugingui/listboxthin.cc')
-rw-r--r--plugingui/listboxthin.cc31
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::