From 16aeecea2c88d64d29f1d4f4e02939c790445e87 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 25 Apr 2016 12:12:42 +0200 Subject: [PATCH] Core: Better "Show Sidebar" icon for the menu Change-Id: I8ce3c6827037908d8097174f3bb0d19452cad75e Reviewed-by: Eike Ziller Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/mainwindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index e5d79f46a45..e1d5e62b8fc 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -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);