Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
d43328bf
Commit
d43328bf
authored
Aug 29, 2020
by
Jean-Baptiste Mardelle
Browse files
Don't resize mixer widget if tabbed
parent
5b4a2b80
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/audiomixer/mixermanager.cpp
View file @
d43328bf
...
...
@@ -21,6 +21,8 @@
#include "mixermanager.hpp"
#include "mixerwidget.hpp"
#include "core.h"
#include "mainwindow.h"
#include "timeline2/model/timelineitemmodel.hpp"
#include "kdenlivesettings.h"
...
...
@@ -199,7 +201,9 @@ void MixerManager::collapseMixers()
m_expandedWidth
=
width
();
m_channelsBox
->
setFixedWidth
(
0
);
//m_line->setMaximumWidth(0);
setFixedWidth
(
m_masterMixer
->
width
()
+
2
*
m_box
->
contentsMargins
().
left
());
if
(
!
pCore
->
window
()
->
isMixedTabbed
())
{
setFixedWidth
(
m_masterMixer
->
width
()
+
2
*
m_box
->
contentsMargins
().
left
());
}
}
else
{
//m_line->setMaximumWidth(QWIDGETSIZE_MAX);
m_channelsBox
->
setMaximumWidth
(
QWIDGETSIZE_MAX
);
...
...
src/mainwindow.cpp
View file @
d43328bf
...
...
@@ -414,7 +414,7 @@ void MainWindow::init()
addAction
(
QStringLiteral
(
"force_icon_theme"
),
iconAction
);
connect
(
iconAction
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
forceIconSet
);
QDockWidget
*
mixerDock
=
addDock
(
i18n
(
"Audio Mixer"
),
QStringLiteral
(
"mixer"
),
pCore
->
mixer
());
m_
mixerDock
=
addDock
(
i18n
(
"Audio Mixer"
),
QStringLiteral
(
"mixer"
),
pCore
->
mixer
());
QAction
*
showMixer
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"view-media-equalizer"
)),
i18n
(
"Audio Mixer"
),
this
);
showMixer
->
setCheckable
(
true
);
addAction
(
QStringLiteral
(
"audiomixer_button"
),
showMixer
);
...
...
@@ -426,15 +426,15 @@ void MainWindow::init()
if
(
mixerDock
->
isVisible
()
&&
!
mixerDock
->
visibleRegion
().
isEmpty
())
{
mixerDock
->
close
();
}
else
{
mixerDock
->
show
();
mixerDock
->
raise
();
m_
mixerDock
->
show
();
m_
mixerDock
->
raise
();
}
});
// Close non-general docks for the initial layout
// only show important ones
m_undoViewDock
->
close
();
mixerDock
->
close
();
m_
mixerDock
->
close
();
/// Tabify Widgets
tabifyDockWidget
(
m_clipMonitorDock
,
m_projectMonitorDock
);
...
...
@@ -3699,9 +3699,13 @@ QDockWidget *MainWindow::addDock(const QString &title, const QString &objectName
return
dockWidget
;
}
bool
MainWindow
::
isMixedTabbed
()
const
{
return
!
tabifiedDockWidgets
(
m_mixerDock
).
isEmpty
();
}
void
MainWindow
::
slotUpdateDockLocation
(
Qt
::
DockWidgetArea
dockLocationArea
)
{
qDebug
()
<<
"== UPDATING DOCK LOCATION FOR: "
<<
dockLocationArea
;
if
(
dockLocationArea
==
Qt
::
NoDockWidgetArea
)
{
updateDockTitleBars
(
false
);
}
else
{
...
...
@@ -3774,7 +3778,7 @@ void MainWindow::updateDockTitleBars(bool isTopLevel)
}
continue
;
}
QList
<
QDockWidget
*>
docked
=
pCore
->
window
()
->
tabifiedDockWidgets
(
dock
);
QList
<
QDockWidget
*>
docked
=
tabifiedDockWidgets
(
dock
);
if
(
docked
.
isEmpty
())
{
if
(
bar
)
{
dock
->
setTitleBarWidget
(
nullptr
);
...
...
src/mainwindow.h
View file @
d43328bf
...
...
@@ -122,6 +122,9 @@ public:
QList
<
QAction
*>
getExtraActions
(
const
QString
&
name
);
/** @brief Returns true if docked widget is tabbed with another widget from its object name */
bool
isTabbedWith
(
QDockWidget
*
widget
,
const
QString
&
otherWidget
);
/** @brief Returns true if mixer widget is tabbed */
bool
isMixedTabbed
()
const
;
/** @brief Returns a ptr to the main timeline widget of the project */
TimelineWidget
*
getMainTimeline
()
const
;
...
...
@@ -178,6 +181,7 @@ private:
AudioGraphSpectrum
*
m_audioSpectrum
;
QDockWidget
*
m_undoViewDock
;
QDockWidget
*
m_mixerDock
;
KSelectAction
*
m_timeFormatButton
;
KSelectAction
*
m_compositeAction
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment