mirror of
https://github.com/LMMS/lmms.git
synced 2026-04-01 12:53:49 -04:00
Add option to move SideBar to right side of window (#5114)
This commit is contained in:
@@ -117,6 +117,7 @@ MainWindow::MainWindow() :
|
||||
splitter->setChildrenCollapsible( false );
|
||||
|
||||
ConfigManager* confMgr = ConfigManager::inst();
|
||||
bool sideBarOnRight = confMgr->value("ui", "sidebaronright").toInt();
|
||||
|
||||
emit initProgress(tr("Preparing plugin browser"));
|
||||
sideBar->appendTab( new PluginBrowser( splitter ) );
|
||||
@@ -171,7 +172,7 @@ MainWindow::MainWindow() :
|
||||
embed::getIconPixmap( "computer" ).transformed( QTransform().rotate( 90 ) ),
|
||||
splitter, dirs_as_items) );
|
||||
|
||||
m_workspace = new QMdiArea( splitter );
|
||||
m_workspace = new QMdiArea(splitter);
|
||||
|
||||
// Load background
|
||||
emit initProgress(tr("Loading background picture"));
|
||||
@@ -194,9 +195,15 @@ MainWindow::MainWindow() :
|
||||
m_workspace->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||
m_workspace->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||
|
||||
hbox->addWidget( sideBar );
|
||||
hbox->addWidget( splitter );
|
||||
|
||||
hbox->addWidget(sideBar);
|
||||
hbox->addWidget(splitter);
|
||||
// If the user wants the sidebar on the right, we move the workspace and
|
||||
// the splitter to the "left" side, or the first widgets in their list
|
||||
if (sideBarOnRight)
|
||||
{
|
||||
splitter->insertWidget(0, m_workspace);
|
||||
hbox->insertWidget(0, splitter);
|
||||
}
|
||||
|
||||
// create global-toolbar at the top of our window
|
||||
m_toolBar = new QWidget( main_widget );
|
||||
|
||||
Reference in New Issue
Block a user