Change uiitem draw

This commit is contained in:
Henrique Santiago 2012-07-02 17:30:15 -03:00
parent 10c227c1ad
commit cfd31ef4c0
1 changed files with 2 additions and 2 deletions

View File

@ -46,14 +46,14 @@ void UIItem::drawSelf(Fw::DrawPane drawPane)
if(m_item) {
Rect drawRect = getPaddingRect();
Point dest = drawRect.topLeft();
Point dest = drawRect.bottomRight() + Point(1,1);
int exactSize = m_item->getExactSize();
if(exactSize == 0)
return;
float scaleFactor = std::min(drawRect.width() / (float)exactSize, drawRect.height() / (float)exactSize);
dest += m_item->getDisplacement() * scaleFactor;
dest += (m_item->getDisplacement() - Point(32,32)) * scaleFactor;
g_painter->setColor(Color::white);
m_item->draw(dest, scaleFactor, true);