borders fix

master
Henrique Santiago 12 years ago
parent 9450fab9e7
commit 3a4ed78b30

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

@ -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);

Loading…
Cancel
Save