From ef449f5baebb0f5d449e14a50aed25c1da90ef7b Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sun, 16 Aug 2015 09:39:00 +0200 Subject: [PATCH] Remove the horizontal scrollbar from controller rack view Removes the potential horizontal scrollbar from the controller rack view. Also sets the MDI window of the controller rack to a bigger size in the constructor and moves it towards the other windows. This code is active in the case where there is no default template from which the window states are loaded. --- src/gui/widgets/ControllerRackView.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/widgets/ControllerRackView.cpp b/src/gui/widgets/ControllerRackView.cpp index b727869af..2bf7054a8 100644 --- a/src/gui/widgets/ControllerRackView.cpp +++ b/src/gui/widgets/ControllerRackView.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,7 @@ ControllerRackView::ControllerRackView( ) : m_scrollArea = new QScrollArea( this ); m_scrollArea->setPalette( QApplication::palette( m_scrollArea ) ); + m_scrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); QWidget * scrollAreaWidget = new QWidget( m_scrollArea ); m_scrollAreaLayout = new QVBoxLayout( scrollAreaWidget ); @@ -84,9 +86,8 @@ ControllerRackView::ControllerRackView( ) : subWin->setWindowFlags( flags ); subWin->setAttribute( Qt::WA_DeleteOnClose, false ); - subWin->move( 880, 310 ); - - resize( 600, 400 ); + subWin->move( 680, 310 ); + subWin->resize(400, 200); } @@ -152,6 +153,7 @@ void ControllerRackView::onControllerAdded( Controller * controller ) m_controllerViews.append( controllerView ); m_scrollAreaLayout->insertWidget( m_nextIndex, controllerView ); + ++m_nextIndex; }