Skip to content
GitLab
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
17c22f88
Commit
17c22f88
authored
Dec 01, 2022
by
Julius Künzel
💬
Browse files
Merge remote-tracking branch 'refs/remotes/upstream/release/22.12'
parents
bd08a5b5
736a10e1
Pipeline
#278350
failed with stage
in 21 minutes and 46 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
17c22f88
...
...
@@ -839,20 +839,24 @@ void MainWindow::init(const QString &mltPath)
connect
(
this
,
&
MainWindow
::
removeBinDock
,
this
,
&
MainWindow
::
slotRemoveBinDock
);
// m_messageLabel->setMessage(QStringLiteral("This is a beta version. Always backup your data"), MltError);
auto
hamburgerMenu
=
KStandardAction
::
hamburgerMenu
(
nullptr
,
nullptr
,
actionCollection
());
// hack to be able to insert the hamburger menu at the first position
QAction
*
const
firstChild
=
toolBar
()
->
actionAt
(
toolBar
()
->
height
()
/
2
,
toolBar
()
->
height
()
/
2
);
QAction
*
const
seperator
=
toolBar
()
->
insertSeparator
(
firstChild
);
toolBar
()
->
insertAction
(
seperator
,
hamburgerMenu
);
hamburgerMenu
->
hideActionsOf
(
toolBar
());
// after the QMenuBar has been initialised
hamburgerMenu
->
setMenuBar
(
menuBar
());
QAction
*
const
showMenuBarAction
=
actionCollection
()
->
action
(
QLatin1String
(
KStandardAction
::
name
(
KStandardAction
::
ShowMenubar
)));
// FIXME: workaround for BUG 171080
showMenuBarAction
->
setChecked
(
!
menuBar
()
->
isHidden
());
hamburgerMenu
->
setShowMenuBarAction
(
showMenuBarAction
);
m_hamburgerMenu
=
KStandardAction
::
hamburgerMenu
(
nullptr
,
nullptr
,
actionCollection
());
// after the QMenuBar has been initialised
m_hamburgerMenu
->
setMenuBar
(
menuBar
());
m_hamburgerMenu
->
setShowMenuBarAction
(
showMenuBarAction
);
connect
(
toolBar
(),
&
KToolBar
::
visibilityChanged
,
this
,
[
&
,
showMenuBarAction
](
bool
visible
)
{
if
(
visible
&&
!
toolBar
()
->
actions
().
contains
(
m_hamburgerMenu
))
{
// hack to be able to insert the hamburger menu at the first position
QAction
*
const
firstChild
=
toolBar
()
->
actionAt
(
toolBar
()
->
height
()
/
2
,
toolBar
()
->
height
()
/
2
);
QAction
*
const
seperator
=
toolBar
()
->
insertSeparator
(
firstChild
);
toolBar
()
->
insertAction
(
seperator
,
m_hamburgerMenu
);
m_hamburgerMenu
->
hideActionsOf
(
toolBar
());
}
});
}
void
MainWindow
::
slotThemeChanged
(
const
QString
&
name
)
...
...
@@ -1001,6 +1005,11 @@ void MainWindow::saveNewToolbarConfig()
m_clipMonitor
->
setupMenu
(
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"monitor_go"
),
this
)),
monitorOverlay
,
m_playZone
,
m_loopZone
,
static_cast
<
QMenu
*>
(
factory
()
->
container
(
QStringLiteral
(
"marker_menu"
),
this
)),
nullptr
,
pCore
->
monitorManager
());
}
// hack to be able to insert the hamburger menu at the first position
QAction
*
const
firstChild
=
toolBar
()
->
actionAt
(
toolBar
()
->
height
()
/
2
,
toolBar
()
->
height
()
/
2
);
QAction
*
const
seperator
=
toolBar
()
->
insertSeparator
(
firstChild
);
toolBar
()
->
insertAction
(
seperator
,
m_hamburgerMenu
);
m_hamburgerMenu
->
hideActionsOf
(
toolBar
());
}
void
MainWindow
::
slotReloadEffects
(
const
QStringList
&
paths
)
...
...
src/mainwindow.h
View file @
17c22f88
...
...
@@ -287,6 +287,8 @@ private:
/** @brief Store latest mouse position in timeline. */
int
m_mousePosition
;
KHamburgerMenu
*
m_hamburgerMenu
;
/** @brief initialize startup values, return true if first run. */
bool
readOptions
();
void
saveOptions
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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