minor changes
This commit is contained in:
parent
748bdebc61
commit
aecd7406f3
@ -202,18 +202,18 @@ QSize QskLayoutEngine::requiredCells() const
|
|||||||
|
|
||||||
for ( int i = 0; i < itemCount(); i++ )
|
for ( int i = 0; i < itemCount(); i++ )
|
||||||
{
|
{
|
||||||
const QskLayoutItem* l = layoutItemAt( i );
|
const auto layoutItem = layoutItemAt( i );
|
||||||
if ( l->isIgnored() )
|
if ( layoutItem->isIgnored() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const int col = l->hasUnlimitedSpan( Qt::Horizontal )
|
const int col = layoutItem->hasUnlimitedSpan( Qt::Horizontal )
|
||||||
? l->firstColumn() + 1 : l->lastColumn();
|
? layoutItem->firstColumn() + 1 : layoutItem->lastColumn();
|
||||||
|
|
||||||
if ( col > lastColumn )
|
if ( col > lastColumn )
|
||||||
lastColumn = col;
|
lastColumn = col;
|
||||||
|
|
||||||
const int row = l->hasUnlimitedSpan( Qt::Vertical )
|
const int row = layoutItem->hasUnlimitedSpan( Qt::Vertical )
|
||||||
? l->firstRow() + 1 : l->lastRow();
|
? layoutItem->firstRow() + 1 : layoutItem->lastRow();
|
||||||
|
|
||||||
if ( row > lastRow )
|
if ( row > lastRow )
|
||||||
lastRow = row;
|
lastRow = row;
|
||||||
@ -226,13 +226,13 @@ void QskLayoutEngine::adjustSpans( int numRows, int numColumns )
|
|||||||
{
|
{
|
||||||
for ( int i = 0; i < itemCount(); i++ )
|
for ( int i = 0; i < itemCount(); i++ )
|
||||||
{
|
{
|
||||||
QskLayoutItem* l = layoutItemAt( i );
|
auto layoutItem = layoutItemAt( i );
|
||||||
|
|
||||||
if ( l->hasUnlimitedSpan( Qt::Horizontal ) )
|
if ( layoutItem->hasUnlimitedSpan( Qt::Horizontal ) )
|
||||||
l->setRowSpan( numColumns - l->firstColumn(), Qt::Horizontal );
|
layoutItem->setRowSpan( numColumns - layoutItem->firstColumn(), Qt::Horizontal );
|
||||||
|
|
||||||
if ( l->hasUnlimitedSpan( Qt::Vertical ) )
|
if ( layoutItem->hasUnlimitedSpan( Qt::Vertical ) )
|
||||||
l->setRowSpan( numRows - l->firstRow(), Qt::Vertical );
|
layoutItem->setRowSpan( numRows - layoutItem->firstRow(), Qt::Vertical );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,8 +90,8 @@ void QskLinearBox::transpose()
|
|||||||
{
|
{
|
||||||
QskLayoutItem* layoutItem = engine().layoutItemAt( i );
|
QskLayoutItem* layoutItem = engine().layoutItemAt( i );
|
||||||
|
|
||||||
const int row = layoutItem->firstRow( Qt::Horizontal );
|
const int row = layoutItem->firstColumn();
|
||||||
const int col = layoutItem->firstRow( Qt::Vertical );
|
const int col = layoutItem->firstRow();
|
||||||
|
|
||||||
engine().removeItem( layoutItem );
|
engine().removeItem( layoutItem );
|
||||||
|
|
||||||
@ -358,10 +358,9 @@ void QskLinearBox::rearrange()
|
|||||||
if ( m_data->orientation == Qt::Vertical )
|
if ( m_data->orientation == Qt::Vertical )
|
||||||
qSwap( col, row );
|
qSwap( col, row );
|
||||||
|
|
||||||
QskLayoutItem* layoutItem = engine().layoutItemAt( i );
|
auto layoutItem = engine().layoutItemAt( i );
|
||||||
|
|
||||||
if ( layoutItem->firstRow( Qt::Horizontal ) != col ||
|
if ( layoutItem->firstColumn() != col || layoutItem->firstRow() != row )
|
||||||
layoutItem->firstRow( Qt::Vertical ) != row )
|
|
||||||
{
|
{
|
||||||
engine().removeItem( layoutItem );
|
engine().removeItem( layoutItem );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user