summaryrefslogtreecommitdiff
path: root/plugingui/painter.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-03-24 19:41:24 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2013-03-24 19:41:24 +0100
commita09bbed0fc02bb61bf26d61398271e9b1f6283de (patch)
treeb8eb99f32902811473f576b418f2db53afc5492a /plugingui/painter.cc
parentb2c09e5625f2811b22d6448be9f228d4f530960f (diff)
More box rendering fixes.
Diffstat (limited to 'plugingui/painter.cc')
-rw-r--r--plugingui/painter.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugingui/painter.cc b/plugingui/painter.cc
index 68e91d9..b230c0c 100644
--- a/plugingui/painter.cc
+++ b/plugingui/painter.cc
@@ -428,10 +428,10 @@ void GUI::Painter::drawBox(int x, int y, Box *box, int width, int height)
// Top:
drawImage(dx, dy, box->topLeft);
- dx += box->topLeft->width() - 1;
+ dx += box->topLeft->width();
drawImageStretched(dx, dy, box->top,
- width - box->topRight->width(),
+ width - box->topRight->width() - box->topLeft->width(),
box->top->height());
dx = x + width - box->topRight->width();
@@ -448,21 +448,22 @@ void GUI::Painter::drawBox(int x, int y, Box *box, int width, int height)
dx = x;
dy = y + box->topLeft->height();
drawImageStretched(dx, dy, box->left, box->left->width(),
- height - box->bottomLeft->height());
+ height - box->topLeft->height() - box->bottomLeft->height());
dx = x + width - box->right->width();
dy = y + box->topRight->height();
- drawImageStretched(dx, dy, box->right, box->right->width(),
- height - box->bottomRight->height());
+ drawImageStretched(dx, dy, box->right,
+ box->right->width(),
+ height - box->topRight->height() - box->bottomRight->height());
// Bottom:
dx = x;
dy = y + height - box->bottomLeft->height();
drawImage(dx, dy, box->bottomLeft);
- dx += box->bottomLeft->width() - 1;
+ dx += box->bottomLeft->width();
drawImageStretched(dx, dy, box->bottom,
- width - box->bottomRight->width(),
+ width - box->bottomRight->width() - box->bottomLeft->width(),
box->bottom->height());
dx = x + width - box->bottomRight->width();