forked from qt-creator/qt-creator
Add option to hide individual modes
With e.g. the Extensions mode we add a mode that is probably not interesting most of the times for most people. The only way to get rid of modes currently is to disable the plugin that provides it. Instead add the option to hide modes via the View > Modes menu. Modes reappear if they are switched to (either via the short cut or other means, like Debug mode when starting the debugger, or edit mode when pressing escape often enough). Change-Id: I56e20849a1f810aea9b5993b04892c915278845f Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -2116,10 +2116,12 @@ void ICorePrivate::registerModeSelectorStyleActions()
|
||||
ActionContainer *mmodeLayouts = ActionManager::createMenu(Constants::M_VIEW_MODESTYLES);
|
||||
mview->addMenu(mmodeLayouts, Constants::G_VIEW_VIEWS);
|
||||
QMenu *styleMenu = mmodeLayouts->menu();
|
||||
styleMenu->setTitle(Tr::tr("Mode Selector Style"));
|
||||
styleMenu->setTitle(Tr::tr("Modes"));
|
||||
auto *stylesGroup = new QActionGroup(styleMenu);
|
||||
stylesGroup->setExclusive(true);
|
||||
|
||||
mmodeLayouts->addSeparator(Constants::G_DEFAULT_THREE);
|
||||
|
||||
ActionBuilder(this, "QtCreator.Modes.IconsAndText")
|
||||
.setText(Tr::tr("Icons and Text"))
|
||||
.setCheckable(true)
|
||||
|
||||
Reference in New Issue
Block a user