avoid layout requirements from too many switch buttons
This commit is contained in:
parent
7402a145ec
commit
13be100e96
@ -133,24 +133,18 @@ namespace
|
||||
SwitchButtonBox( QQuickItem* parent = nullptr )
|
||||
: ButtonBox( Qt::Horizontal, parent )
|
||||
{
|
||||
setDimension( 6 );
|
||||
setDimension( 2 );
|
||||
setSpacing( 20 );
|
||||
setDefaultAlignment( Qt::AlignCenter );
|
||||
|
||||
for ( auto orientation : { Qt::Vertical, Qt::Horizontal } )
|
||||
{
|
||||
using Q = QskSwitchButton;
|
||||
auto button = new QskSwitchButton( orientation, this );
|
||||
button->setIconMode( QskSwitchButton::ShowIconAlways );
|
||||
|
||||
for( auto iconMode : { Q::NoIcon, Q::ShowIconWhenSelected, Q::ShowIconAlways } )
|
||||
{
|
||||
auto button = new QskSwitchButton( orientation, this );
|
||||
button->setIconMode( iconMode );
|
||||
|
||||
auto invertedButton = new QskSwitchButton( orientation, this );
|
||||
invertedButton->setInverted( true );
|
||||
invertedButton->setChecked( true );
|
||||
invertedButton->setIconMode( iconMode );
|
||||
}
|
||||
auto invertedButton = new QskSwitchButton( orientation, this );
|
||||
invertedButton->setInverted( true );
|
||||
invertedButton->setChecked( true );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user