Core: Better "Show Sidebar" icon for the menu

Change-Id: I8ce3c6827037908d8097174f3bb0d19452cad75e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
Alessandro Portale
2016-04-25 12:12:42 +02:00
parent aa2908a4a0
commit 16aeecea2c

View File

@@ -691,7 +691,7 @@ void MainWindow::registerDefaultActions()
}
// Show Sidebar Action
m_toggleSideBarAction = new QAction(Icons::TOGGLE_SIDEBAR_TOOLBAR.icon(),
m_toggleSideBarAction = new QAction(Icons::TOGGLE_SIDEBAR.icon(),
QCoreApplication::translate("Core", Constants::TR_SHOW_SIDEBAR),
this);
m_toggleSideBarAction->setCheckable(true);
@@ -699,7 +699,9 @@ void MainWindow::registerDefaultActions()
cmd->setAttribute(Command::CA_UpdateText);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+0") : tr("Alt+0")));
connect(m_toggleSideBarAction, &QAction::triggered, this, &MainWindow::setSidebarVisible);
m_toggleSideBarButton->setDefaultAction(cmd->action());
ProxyAction *toggleSideBarProxyAction =
ProxyAction::proxyActionWithIcon(cmd->action(), Core::Icons::TOGGLE_SIDEBAR_TOOLBAR.icon());
m_toggleSideBarButton->setDefaultAction(toggleSideBarProxyAction);
mwindow->addAction(cmd, Constants::G_WINDOW_VIEWS);
m_toggleSideBarAction->setEnabled(false);