addCell -> expandTo
This commit is contained in:
parent
bfe2b58ae3
commit
49c216b582
@ -34,13 +34,13 @@ void QskLayoutChain::reset( int count, qreal constraint )
|
||||
m_sumStretches = 0;
|
||||
}
|
||||
|
||||
void QskLayoutChain::addCell( int index, const Cell& cell )
|
||||
void QskLayoutChain::expandTo( int index, const Cell& newCell )
|
||||
{
|
||||
auto& combinedCell = m_cells[ index ];
|
||||
auto& cell = m_cells[ index ];
|
||||
|
||||
combinedCell.canGrow |= cell.canGrow;
|
||||
combinedCell.stretch = qMax( combinedCell.stretch, cell.stretch );
|
||||
combinedCell.hint.intersect( cell.hint );
|
||||
cell.canGrow |= newCell.canGrow;
|
||||
cell.stretch = qMax( cell.stretch, newCell.stretch );
|
||||
cell.hint.intersect( newCell.hint );
|
||||
}
|
||||
|
||||
void QskLayoutChain::finish()
|
||||
|
@ -52,7 +52,7 @@ class QskLayoutChain
|
||||
void invalidate();
|
||||
|
||||
void reset( int count, qreal constraint );
|
||||
void addCell( int index, const Cell& );
|
||||
void expandTo( int index, const Cell& );
|
||||
void finish();
|
||||
|
||||
const Cell& cell( int index ) const { return m_cells[ index ]; }
|
||||
|
@ -616,7 +616,7 @@ void EntryTable::resetChain( Qt::Orientation orientation,
|
||||
constraints.isEmpty() ? -1.0 : constraints[index1].length;
|
||||
|
||||
const auto cell = this->cell( entry, orientation, cellConstraint );
|
||||
chain.addCell( index2, cell );
|
||||
chain.expandTo( index2, cell );
|
||||
|
||||
if ( m_orientation != orientation )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user