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 ac47d51bfb

Fixes: QTCREATORBUG-28108
Change-Id: I47c443772488b7f9e29c8fadf01011d4ddfd5686
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2022-10-17 11:20:45 +02:00
parent bf57568880
commit 06402e0dc6
2 changed files with 7 additions and 11 deletions

View File

@@ -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

View File

@@ -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();
}