comparison main/MainWindow.cpp @ 174:aaf806ce329a

* Fix #1757772 tempo, dynamic related plug-ins bug -- make auto-align only auto-align if there is a unit involved * Fix #1755366 text layer bug in retrieved session * Fix input model selection in plugin parameter dialog (was being ignored) * Use lighter background than the standard widget one for panes (assuming the widget background is light but not white) -- similarly darker if dark * Fix colour reference counting in loaded session in SingleColourLayer * Reset overview pane colour when switching dark background on or off
author Chris Cannam
date Tue, 14 Aug 2007 13:58:53 +0000
parents c1980ed39d2e
children 5bde373ad5ca
comparison
equal deleted inserted replaced
173:102317ae3970 174:aaf806ce329a
211 211
212 m_panLayer = new WaveformLayer; 212 m_panLayer = new WaveformLayer;
213 m_panLayer->setChannelMode(WaveformLayer::MergeChannels); 213 m_panLayer->setChannelMode(WaveformLayer::MergeChannels);
214 m_panLayer->setAggressiveCacheing(true); 214 m_panLayer->setAggressiveCacheing(true);
215 m_overview->addLayer(m_panLayer); 215 m_overview->addLayer(m_panLayer);
216 m_panLayer->setBaseColour(ColourDatabase::getInstance()->getColourIndex(Qt::darkGreen)); 216
217 if (m_viewManager->getGlobalDarkBackground()) {
218 m_panLayer->setBaseColour
219 (ColourDatabase::getInstance()->getColourIndex(tr("Bright Green")));
220 } else {
221 m_panLayer->setBaseColour
222 (ColourDatabase::getInstance()->getColourIndex(tr("Green")));
223 }
217 224
218 m_playSource = new AudioCallbackPlaySource(m_viewManager); 225 m_playSource = new AudioCallbackPlaySource(m_viewManager);
219 226
220 connect(m_playSource, SIGNAL(sampleRateMismatch(size_t, size_t, bool)), 227 connect(m_playSource, SIGNAL(sampleRateMismatch(size_t, size_t, bool)),
221 this, SLOT(sampleRateMismatch(size_t, size_t, bool))); 228 this, SLOT(sampleRateMismatch(size_t, size_t, bool)));
3533 3540
3534 void 3541 void
3535 MainWindow::toggleDarkBackground() 3542 MainWindow::toggleDarkBackground()
3536 { 3543 {
3537 if (!m_viewManager) return; 3544 if (!m_viewManager) return;
3545
3538 m_viewManager->setGlobalDarkBackground 3546 m_viewManager->setGlobalDarkBackground
3539 (!m_viewManager->getGlobalDarkBackground()); 3547 (!m_viewManager->getGlobalDarkBackground());
3548
3549 if (m_viewManager->getGlobalDarkBackground()) {
3550 m_panLayer->setBaseColour
3551 (ColourDatabase::getInstance()->getColourIndex(tr("Bright Green")));
3552 } else {
3553 m_panLayer->setBaseColour
3554 (ColourDatabase::getInstance()->getColourIndex(tr("Green")));
3555 }
3540 } 3556 }
3541 3557
3542 void 3558 void
3543 MainWindow::preferenceChanged(PropertyContainer::PropertyName name) 3559 MainWindow::preferenceChanged(PropertyContainer::PropertyName name)
3544 { 3560 {