Add timeline toolbar action to show/hide audio mixer

parent 62ee15a6
Pipeline #9267 passed with stage
in 13 minutes and 29 seconds
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="kdenlive" version="165" translationDomain="kdenlive">
<kpartgui name="kdenlive" version="166" translationDomain="kdenlive">
<MenuBar>
<Menu name="file" >
<Action name="dvd_wizard" />
......@@ -248,6 +248,7 @@
<Action name="favorite_effects" />
<Separator />
<Action name="timeline_preview_button" />
<Action name="audiomixer_button" />
</ToolBar>
<ToolBar name="extraToolBar" >
<text>Extra Toolbar</text>
......
......@@ -241,6 +241,17 @@ void MainWindow::init()
QDockWidget *libraryDock = addDock(i18n("Library"), QStringLiteral("library"), pCore->library());
QDockWidget *mixerDock = addDock(i18n("Audio Mixer"), QStringLiteral("mixer"), pCore->mixer());
QAction *showMixer = new QAction(QIcon::fromTheme(QStringLiteral("adjustlevels")), i18n("Audio Mixer"), this);
showMixer->setCheckable(true);
addAction(QStringLiteral("audiomixer_button"), showMixer);
connect(mixerDock, &QDockWidget::visibilityChanged, showMixer, &QAction::setChecked);
connect(showMixer, &QAction::triggered, [&, mixerDock]() {
if (mixerDock->isVisible()) {
mixerDock->close();
} else {
mixerDock->show();
}
});
m_clipMonitor = new Monitor(Kdenlive::ClipMonitor, pCore->monitorManager(), this);
pCore->bin()->setMonitor(m_clipMonitor);
......@@ -381,7 +392,7 @@ void MainWindow::init()
iconAction->setChecked(KdenliveSettings::force_breeze());
addAction(QStringLiteral("force_icon_theme"), iconAction);
connect(iconAction, &QAction::triggered, this, &MainWindow::forceIconSet);
// Close non-general docks for the initial layout
// only show important ones
m_undoViewDock->close();
......
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