Commit ceb24b01 authored by Christoph Cullmann's avatar 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
......@@ -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."
......
Supports Markdown
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