Mercurial > hg > sonic-visualiser
changeset 444:4d9e4053c120 toggle
The pane stack is in a scroll view! I'd forgotten that. So, let's show and hide that instead
author | Chris Cannam |
---|---|
date | Fri, 24 Jun 2011 11:21:00 +0100 |
parents | b8025c99fe68 |
children | 45f2e4cda1d7 |
files | main/MainWindow.cpp main/MainWindow.h |
diffstat | 2 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/main/MainWindow.cpp Fri Jun 24 09:31:33 2011 +0100 +++ b/main/MainWindow.cpp Fri Jun 24 11:21:00 2011 +0100 @@ -210,12 +210,11 @@ m_descriptionLabel = new QLabel; //!!! hang on, this is declared in base class -- should be declared and initialised by same class - QScrollArea *scroll = new QScrollArea(frame); - scroll->setWidgetResizable(true); - scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - scroll->setFrameShape(QFrame::NoFrame); - - scroll->setWidget(m_paneStack); + m_scroll = new QScrollArea(frame); + m_scroll->setWidgetResizable(true); + m_scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_scroll->setFrameShape(QFrame::NoFrame); + m_scroll->setWidget(m_paneStack); m_overview = new Overview(frame); m_overview->setViewManager(m_viewManager); @@ -272,7 +271,7 @@ m_playControlsSpacer = new QFrame; layout->setSpacing(4); - layout->addWidget(scroll, 0, 0, 1, 5); + layout->addWidget(m_scroll, 0, 0, 1, 5); layout->addWidget(m_overview, 1, 1); layout->addWidget(m_playControlsSpacer, 1, 2); layout->addWidget(m_playSpeed, 1, 3); @@ -4178,11 +4177,11 @@ if (m_viewManager->getMinimalModeEnabled()) { visible = true; m_viewManager->setMinimalModeEnabled(false); - m_paneStack->show(); + m_scroll->show(); } else { visible = false; m_viewManager->setMinimalModeEnabled(true); - m_paneStack->hide(); + m_scroll->hide(); } //cerr << "Call to MainWindow::toggleViewMode"<< endl;
--- a/main/MainWindow.h Fri Jun 24 09:31:33 2011 +0100 +++ b/main/MainWindow.h Fri Jun 24 11:21:00 2011 +0100 @@ -58,6 +58,7 @@ class KeyReference; class Labeller; class ActivityLog; +class QScrollArea; class MainWindow : public MainWindowBase { @@ -182,6 +183,7 @@ Fader *m_fader; AudioDial *m_playSpeed; WaveformLayer *m_panLayer; + QScrollArea *m_scroll; bool m_mainMenusCreated; QMenu *m_paneMenu;