From 06402e0dc6405f23fac1550fa5132d048f9b32fc Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 17 Oct 2022 11:20:45 +0200 Subject: [PATCH] Re-add "Toogle Bookmark" icon into touch bar Instead of "Edit Bookmark" which was not intended to be there. Also move it behind the "navigation" items, since these are probably used more often. Amends ac47d51bfb379b8c3b51d832d54a90dba18a518f Fixes: QTCREATORBUG-28108 Change-Id: I47c443772488b7f9e29c8fadf01011d4ddfd5686 Reviewed-by: Reviewed-by: David Schulz --- src/plugins/bookmarks/bookmarksplugin.cpp | 16 ++++++---------- src/plugins/coreplugin/mainwindow.cpp | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/plugins/bookmarks/bookmarksplugin.cpp b/src/plugins/bookmarks/bookmarksplugin.cpp index f1b6a78ddf3..a48288e39a0 100644 --- a/src/plugins/bookmarks/bookmarksplugin.cpp +++ b/src/plugins/bookmarks/bookmarksplugin.cpp @@ -88,20 +88,16 @@ BookmarksPluginPrivate::BookmarksPluginPrivate() // Toggle Command *cmd = ActionManager::registerAction(&m_toggleAction, BOOKMARKS_TOGGLE_ACTION, editorManagerContext); - cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+M") - : Tr::tr("Ctrl+M"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+M") : Tr::tr("Ctrl+M"))); cmd->setTouchBarIcon(Utils::Icons::MACOS_TOUCHBAR_BOOKMARK.icon()); mbm->addAction(cmd); - - cmd = ActionManager::registerAction(&m_editAction, - BOOKMARKS_EDIT_ACTION, - editorManagerContext); - cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+M") - : Tr::tr("Ctrl+Shift+M"))); - mbm->addAction(cmd); - touchBar->addAction(cmd, Core::Constants::G_TOUCHBAR_EDITOR); + cmd = ActionManager::registerAction(&m_editAction, BOOKMARKS_EDIT_ACTION, editorManagerContext); + cmd->setDefaultKeySequence( + QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+M") : Tr::tr("Ctrl+Shift+M"))); + mbm->addAction(cmd); + mbm->addSeparator(); // Previous diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index a872320cafc..54c0b38a72c 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -524,8 +524,8 @@ void MainWindow::registerDefaultContainers() QIcon(), "Main TouchBar" /*never visible*/); ac->appendGroup(Constants::G_TOUCHBAR_HELP); - ac->appendGroup(Constants::G_TOUCHBAR_EDITOR); ac->appendGroup(Constants::G_TOUCHBAR_NAVIGATION); + ac->appendGroup(Constants::G_TOUCHBAR_EDITOR); ac->appendGroup(Constants::G_TOUCHBAR_OTHER); ac->touchBar()->setApplicationTouchBar(); }