borders fix

This commit is contained in:
Henrique Santiago
2012-01-19 15:08:52 -02:00
parent 9450fab9e7
commit 3a4ed78b30
2 changed files with 6 additions and 7 deletions

View File

@@ -327,22 +327,22 @@ void UIWidget::drawBorder(const Rect& screenCoords)
g_painter.drawFilledRect(borderRect);
}
// right
if(m_borderWidth.right > 0 && m_borderColor.top.a() > 0) {
g_painter.setColor(m_borderColor.top);
if(m_borderWidth.right > 0 && m_borderColor.right.a() > 0) {
g_painter.setColor(m_borderColor.right);
Rect borderRect(screenCoords.topRight() - Point(m_borderWidth.right - 1, 0), m_borderWidth.right, screenCoords.height());
g_painter.drawFilledRect(borderRect);
}
// bottom
if(m_borderWidth.bottom > 0 && m_borderColor.top.a() > 0) {
g_painter.setColor(m_borderColor.top);
if(m_borderWidth.bottom > 0 && m_borderColor.bottom.a() > 0) {
g_painter.setColor(m_borderColor.bottom);
Rect borderRect(screenCoords.bottomLeft() - Point(0, m_borderWidth.bottom - 1), screenCoords.width(), m_borderWidth.bottom);
g_painter.drawFilledRect(borderRect);
}
// left
if(m_borderWidth.top > 0 && m_borderColor.top.a() > 0) {
g_painter.setColor(m_borderColor.top);
if(m_borderWidth.left > 0 && m_borderColor.left.a() > 0) {
g_painter.setColor(m_borderColor.left);
Rect borderRect(screenCoords.topLeft(), m_borderWidth.left, screenCoords.height());
g_painter.drawFilledRect(borderRect);