Don't tabify audio mixer by default, better default size

parent 79d0e966
......@@ -212,15 +212,14 @@ void MixerManager::collapseMixers()
}
}
/*QSize MixerManager::sizeHint() const
{
QSize sz = QApplication::primaryScreen()->availableSize();
return QSize(m_masterMixer ? m_masterMixer->width() * (m_mixers.size() + 1) : sz.width() / 5, sz.height() / 3);
}*/
void MixerManager::resetSizePolicy()
{
setMaximumWidth(QWIDGETSIZE_MAX);
setMinimumWidth(0);
}
QSize MixerManager::sizeHint() const
{
QSize sz = QApplication::primaryScreen()->availableSize();
return QSize(m_recommandedWidth, 0);
}
......@@ -68,7 +68,7 @@ signals:
protected:
std::unordered_map<int, std::shared_ptr<MixerWidget>> m_mixers;
std::shared_ptr<MixerWidget> m_masterMixer;
//QSize sizeHint() const override;
QSize sizeHint() const override;
private:
std::shared_ptr<Mlt::Tractor> m_masterService;
......
......@@ -274,12 +274,14 @@ void MixerWidget::buildUI(Mlt::Tractor *service, const QString &trackTag)
});
} else {
m_collapse = new QToolButton(this);
m_collapse->setIcon(QIcon::fromTheme("arrow-left"));
m_collapse->setIcon(KdenliveSettings::mixerCollapse() ? QIcon::fromTheme("arrow-left") : QIcon::fromTheme("arrow-right"));
m_collapse->setToolTip(i18n("Show Channels"));
m_collapse->setCheckable(true);
m_collapse->setAutoRaise(true);
m_collapse->setChecked(KdenliveSettings::mixerCollapse() );
connect(m_collapse, &QToolButton::clicked, [&]() {
KdenliveSettings::setMixerCollapse(m_collapse->isChecked());
m_collapse->setIcon(m_collapse->isChecked() ? QIcon::fromTheme("arrow-left") : QIcon::fromTheme("arrow-right"));
m_manager->collapseMixers();
});
}
......
......@@ -394,20 +394,21 @@ void MainWindow::init()
showMixer->setChecked(visible);
});
connect(showMixer, &QAction::triggered, [&, mixerDock]() {
if (mixerDock->isVisible()) {
if (mixerDock->isVisible() && !mixerDock->visibleRegion().isEmpty()) {
mixerDock->close();
} else {
mixerDock->show();
mixerDock->raise();
}
});
// Close non-general docks for the initial layout
// only show important ones
m_undoViewDock->close();
mixerDock->close();
/// Tabify Widgets
tabifyDockWidget(m_clipMonitorDock, m_projectMonitorDock);
tabifyDockWidget(mixerDock, m_transitionListDock);
tabifyDockWidget(m_transitionListDock, m_effectListDock);
tabifyDockWidget(m_effectStackDock, pCore->bin()->clipPropertiesDock());
bool firstRun = readOptions();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment