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

@ -2,7 +2,6 @@ Module
name: client name: client
description: Load all other otclient dependecies description: Load all other otclient dependecies
author: OTClient team author: OTClient team
website: https://github.com/edubart/otclient
// NOTE: order does matter // NOTE: order does matter
dependencies: dependencies:

View File

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