summaryrefslogtreecommitdiff
path: root/plugingui/listbox.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/listbox.cc
parenta1fba9ba11a13f94c524f2ac78206b3fdfb3be74 (diff)
New box rendering of all widgets. Minor tweaks still missing.
Diffstat (limited to 'plugingui/listbox.cc')
-rw-r--r--plugingui/listbox.cc19
1 files changed, 14 insertions, 5 deletions
diff --git a/plugingui/listbox.cc b/plugingui/listbox.cc
index 45ea5f5..3dfba5c 100644
--- a/plugingui/listbox.cc
+++ b/plugingui/listbox.cc
@@ -34,6 +34,16 @@
GUI::ListBox::ListBox(GUI::Widget *parent)
: GUI::Widget(parent)
{
+ 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");
+
padding = 4;
btn_size = 14;
@@ -140,11 +150,10 @@ void GUI::ListBox::repaintEvent(GUI::RepaintEvent *e)
p.clear();
- p.setColour(Colour(0, 0.7));
- p.drawFilledRectangle(0, 0, width() - 1, height() - 1);
-
- p.setColour(Colour(0.5, 1));
- p.drawRectangle(0, 0, width() - 1, height() - 1);
+ int w = width();
+ int h = height();
+ if(w == 0 || h == 0) return;
+ p.drawBox(0, 0, &box, w, h);
int yoffset = padding / 2;
int skip = scroll_offset;