UI tweaks

This commit is contained in:
Eduardo Bart
2012-04-30 13:40:12 -03:00
parent 3f689e0edf
commit beaba25af1
19 changed files with 154 additions and 80 deletions

View File

@@ -101,8 +101,10 @@ bool UIGridLayout::internalUpdate()
Point virtualPos = Point(column * (m_cellSize.width() + cellSpacing), line * (m_cellSize.height() + cellSpacing));
preferredHeight = virtualPos.y + m_cellSize.height();
Point pos = topLeft + virtualPos - parentWidget->getVirtualOffset();
Rect dest = Rect(pos, m_cellSize);
dest.expand(-widget->getMarginTop(), -widget->getMarginRight(), -widget->getMarginBottom(), -widget->getMarginLeft());
if(widget->setRect(Rect(pos, m_cellSize)))
if(widget->setRect(dest))
changed = true;
index++;