forked from qt-creator/qt-creator
Icon refresh: First step towards the new Qt Creator themes
http://blog.qt.io/blog/author/didesous/ announced new designs/themes for Qt Creator. This patch replaces many of the existing toolbar icons with recolorizable masks for better theming support. Change-Id: I557aa485205fe2624f33724226f698c303342b40 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
@@ -68,6 +68,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/fancymainwindow.h>
|
||||
#include <utils/styledbar.h>
|
||||
#include <utils/themehelper.h>
|
||||
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
@@ -695,7 +696,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
|
||||
// go back
|
||||
action = new QAction(this);
|
||||
action->setDisabled(true);
|
||||
action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_PREV)));
|
||||
action->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_PREV)));
|
||||
action->setToolTip(tr("Go back one step in history. This will select the previously selected item."));
|
||||
connect(action, &QAction::triggered, m_stackBrowser, &StackBrowser::goBack);
|
||||
layout->addWidget(createToolButton(action));
|
||||
@@ -704,7 +705,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
|
||||
// go forward
|
||||
action = new QAction(this);
|
||||
action->setDisabled(true);
|
||||
action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_NEXT)));
|
||||
action->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_NEXT)));
|
||||
action->setToolTip(tr("Go forward one step in history."));
|
||||
connect(action, &QAction::triggered, m_stackBrowser, &StackBrowser::goNext);
|
||||
layout->addWidget(createToolButton(action));
|
||||
@@ -782,7 +783,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
|
||||
|
||||
// filtering
|
||||
action = new QAction(tr("Show Project Costs Only"), this);
|
||||
action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_FILTER)));
|
||||
action->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
|
||||
action->setToolTip(tr("Show only profiling info that originated from this project source."));
|
||||
action->setCheckable(true);
|
||||
connect(action, &QAction::toggled, this, &CallgrindToolPrivate::handleFilterProjectCosts);
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
#include <utils/fancymainwindow.h>
|
||||
#include <utils/styledbar.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/themehelper.h>
|
||||
|
||||
#include <QString>
|
||||
#include <QLatin1String>
|
||||
@@ -386,7 +387,7 @@ QWidget *MemcheckTool::createWidgets()
|
||||
// Go to previous leak.
|
||||
action = new QAction(this);
|
||||
action->setDisabled(true);
|
||||
action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_PREV)));
|
||||
action->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_PREV)));
|
||||
action->setToolTip(tr("Go to previous leak."));
|
||||
connect(action, &QAction::triggered, m_errorView, &MemcheckErrorView::goBack);
|
||||
button = new QToolButton;
|
||||
@@ -397,7 +398,7 @@ QWidget *MemcheckTool::createWidgets()
|
||||
// Go to next leak.
|
||||
action = new QAction(this);
|
||||
action->setDisabled(true);
|
||||
action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_NEXT)));
|
||||
action->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_NEXT)));
|
||||
action->setToolTip(tr("Go to next leak."));
|
||||
connect(action, &QAction::triggered, m_errorView, &MemcheckErrorView::goNext);
|
||||
button = new QToolButton;
|
||||
@@ -406,7 +407,7 @@ QWidget *MemcheckTool::createWidgets()
|
||||
m_goNext = action;
|
||||
|
||||
QToolButton *filterButton = new QToolButton;
|
||||
filterButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_FILTER)));
|
||||
filterButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
|
||||
filterButton->setText(tr("Error Filter"));
|
||||
filterButton->setPopupMode(QToolButton::InstantPopup);
|
||||
filterButton->setProperty("noArrow", true);
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/themehelper.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QCoreApplication>
|
||||
@@ -248,7 +249,8 @@ void ValgrindPlugin::extensionsInitialized()
|
||||
editorContextMenu->addSeparator(analyzerContext);
|
||||
|
||||
QAction *action = new QAction(tr("Profile Costs of This Function and Its Callees"), this);
|
||||
action->setIcon(QIcon(QLatin1String(Analyzer::Constants::ANALYZER_CONTROL_START_ICON)));
|
||||
action->setIcon(Utils::ThemeHelper::themedIcon(
|
||||
QLatin1String(Analyzer::Constants::ANALYZER_CONTROL_START_ICON)));
|
||||
connect(action, &QAction::triggered, cgTool,
|
||||
&CallgrindTool::handleShowCostsOfFunction);
|
||||
Command *cmd = ActionManager::registerAction(action, "Analyzer.Callgrind.ShowCostsOfFunction",
|
||||
|
||||
Reference in New Issue
Block a user