UI: make the layout scrollable when there are many buttons

This commit is contained in:
hydrargyrum
2014-05-12 17:33:57 +02:00
parent b7d362a546
commit 0957dc3850
2 changed files with 6 additions and 1 deletions

View File

@ -95,9 +95,12 @@ LayoutEdit::LayoutEdit( LayoutManager* l )
mainLayout->addWidget( joyButtons );
//we have a WidgetStack to represent the multiple joypads
padScroll = new QScrollArea(this);
padScroll->setWidgetResizable(true);
mainLayout->addWidget(padScroll);
padStack = new QStackedWidget( this );
padStack->setFrameStyle(QFrame::Box | QFrame::Sunken );
mainLayout->addWidget(padStack);
padScroll->setWidget(padStack);
//go through each of the available joysticks
// i is the current index into PadStack