forked from qt-creator/qt-creator
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:
@@ -88,20 +88,16 @@ BookmarksPluginPrivate::BookmarksPluginPrivate()
|
|||||||
// Toggle
|
// Toggle
|
||||||
Command *cmd = ActionManager::registerAction(&m_toggleAction, BOOKMARKS_TOGGLE_ACTION,
|
Command *cmd = ActionManager::registerAction(&m_toggleAction, BOOKMARKS_TOGGLE_ACTION,
|
||||||
editorManagerContext);
|
editorManagerContext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+M")
|
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+M") : Tr::tr("Ctrl+M")));
|
||||||
: Tr::tr("Ctrl+M")));
|
|
||||||
cmd->setTouchBarIcon(Utils::Icons::MACOS_TOUCHBAR_BOOKMARK.icon());
|
cmd->setTouchBarIcon(Utils::Icons::MACOS_TOUCHBAR_BOOKMARK.icon());
|
||||||
mbm->addAction(cmd);
|
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);
|
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();
|
mbm->addSeparator();
|
||||||
|
|
||||||
// Previous
|
// Previous
|
||||||
|
@@ -524,8 +524,8 @@ void MainWindow::registerDefaultContainers()
|
|||||||
QIcon(),
|
QIcon(),
|
||||||
"Main TouchBar" /*never visible*/);
|
"Main TouchBar" /*never visible*/);
|
||||||
ac->appendGroup(Constants::G_TOUCHBAR_HELP);
|
ac->appendGroup(Constants::G_TOUCHBAR_HELP);
|
||||||
ac->appendGroup(Constants::G_TOUCHBAR_EDITOR);
|
|
||||||
ac->appendGroup(Constants::G_TOUCHBAR_NAVIGATION);
|
ac->appendGroup(Constants::G_TOUCHBAR_NAVIGATION);
|
||||||
|
ac->appendGroup(Constants::G_TOUCHBAR_EDITOR);
|
||||||
ac->appendGroup(Constants::G_TOUCHBAR_OTHER);
|
ac->appendGroup(Constants::G_TOUCHBAR_OTHER);
|
||||||
ac->touchBar()->setApplicationTouchBar();
|
ac->touchBar()->setApplicationTouchBar();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user