mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2025-01-29 20:34:56 +01:00
TileLayout: fix a layout bug in "static" mode
This commit is contained in:
parent
51d6a3bc8b
commit
6411b1975d
1 changed files with 7 additions and 0 deletions
|
@ -92,6 +92,9 @@ void TileLayout::setGeometry(const QRect &rect)
|
|||
|
||||
void TileLayout::doLayout(const QRect &rect)
|
||||
{
|
||||
if (m_items.isEmpty())
|
||||
return;
|
||||
|
||||
const int width = rect.width() + m_space;
|
||||
const int height = rect.height() + m_space;
|
||||
if (m_dynamic)
|
||||
|
@ -129,6 +132,10 @@ void TileLayout::doLayout(const QRect &rect)
|
|||
m_nbRows = (tilesCount - 1) / m_nbCols + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_nbRows = (m_items.size() - 1) / m_nbCols + 1;
|
||||
}
|
||||
|
||||
if (m_nbCols == 0)
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue