From 3a4ed78b30fb61e9c04afcc2dae1e26c3e9c8db1 Mon Sep 17 00:00:00 2001 From: Henrique Santiago Date: Thu, 19 Jan 2012 15:08:52 -0200 Subject: [PATCH] borders fix --- modules/client/client.otmod | 1 - src/framework/ui/uiwidgetbasestyle.cpp | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/client/client.otmod b/modules/client/client.otmod index fa8555bb..002c5bc8 100644 --- a/modules/client/client.otmod +++ b/modules/client/client.otmod @@ -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: diff --git a/src/framework/ui/uiwidgetbasestyle.cpp b/src/framework/ui/uiwidgetbasestyle.cpp index d38b6dd8..aea0ea73 100644 --- a/src/framework/ui/uiwidgetbasestyle.cpp +++ b/src/framework/ui/uiwidgetbasestyle.cpp @@ -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);