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
Utilities
Kate
Commits
ceb24b01
Commit
ceb24b01
authored
Sep 24, 2022
by
Christoph Cullmann
🍨
Browse files
support hamburger menu in Kate & KWrite
first try, just add the hamburger action
parent
c277ed7d
Pipeline
#236389
passed with stage
in 6 minutes and 42 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
apps/lib/katemainwindow.cpp
View file @
ceb24b01
...
...
@@ -257,6 +257,13 @@ void KateMainWindow::setupImportantActions()
actionCollection
()
->
setDefaultShortcut
(
a
,
QKeySequence
(
Qt
::
CTRL
|
Qt
::
ALT
|
Qt
::
Key_O
));
connect
(
a
,
&
QAction
::
triggered
,
this
,
&
KateMainWindow
::
slotQuickOpen
);
a
->
setWhatsThis
(
i18n
(
"Open a form to quick open documents."
));
// enable hamburger menu
auto
hamburgerMenu
=
KStandardAction
::
hamburgerMenu
(
nullptr
,
nullptr
,
actionCollection
());
QAction
*
const
seperator
=
toolBar
()
->
addSeparator
();
toolBar
()
->
insertAction
(
seperator
,
hamburgerMenu
);
hamburgerMenu
->
setMenuBar
(
menuBar
());
hamburgerMenu
->
setShowMenuBarAction
(
m_paShowMenuBar
);
}
void
KateMainWindow
::
setupMainWindow
()
...
...
@@ -734,7 +741,8 @@ void KateMainWindow::toggleShowMenuBar(bool showMessage)
m_viewManager
->
activeView
()
->
contextMenu
()
->
removeAction
(
m_paShowMenuBar
);
}
}
else
{
if
(
showMessage
)
{
// we have a hamburger button in the toolbar, we can avoid the message if that is still visible
if
(
showMessage
&&
toolBar
()
->
isHidden
())
{
const
QString
accel
=
m_paShowMenuBar
->
shortcut
().
toString
();
KMessageBox
::
information
(
this
,
i18n
(
"This will hide the menu bar completely."
...
...
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