forked from qt-creator/qt-creator
Themed Icons: Introduce Utils::Icon
Instead of describing icons via file name or in the themed icons case via a string that is a list of mask/color pairs, we have now a class for it. Icons are now listed in per-plugin *icons.h headers. RunControl::m_icon was The only place left where an icon property was in fact a string. This patch changes that member to be a Utils::Icon. Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -48,7 +48,6 @@
|
||||
#include <utils/fancymainwindow.h>
|
||||
#include <utils/fileinprojectfinder.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/themehelper.h>
|
||||
#include <projectexplorer/environmentaspect.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/project.h>
|
||||
@@ -59,6 +58,7 @@
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/coreicons.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/find/findplugin.h>
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -289,7 +289,7 @@ QWidget *QmlProfilerTool::createWidgets()
|
||||
layout->addWidget(d->m_recordButton);
|
||||
|
||||
d->m_clearButton = new QToolButton(toolbarWidget);
|
||||
d->m_clearButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(ICON_CLEAN_PANE)));
|
||||
d->m_clearButton->setIcon(Icons::CLEAN_PANE.icon());
|
||||
d->m_clearButton->setToolTip(tr("Discard data"));
|
||||
|
||||
connect(d->m_clearButton, &QAbstractButton::clicked, [this](){
|
||||
@@ -300,14 +300,14 @@ QWidget *QmlProfilerTool::createWidgets()
|
||||
layout->addWidget(d->m_clearButton);
|
||||
|
||||
d->m_searchButton = new QToolButton;
|
||||
d->m_searchButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(ICON_ZOOM)));
|
||||
d->m_searchButton->setIcon(Icons::ZOOM.icon());
|
||||
d->m_searchButton->setToolTip(tr("Search timeline event notes."));
|
||||
layout->addWidget(d->m_searchButton);
|
||||
|
||||
connect(d->m_searchButton, &QToolButton::clicked, this, &QmlProfilerTool::showTimeLineSearch);
|
||||
|
||||
d->m_displayFeaturesButton = new QToolButton;
|
||||
d->m_displayFeaturesButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(ICON_FILTER)));
|
||||
d->m_displayFeaturesButton->setIcon(Icons::FILTER.icon());
|
||||
d->m_displayFeaturesButton->setToolTip(tr("Hide or show event categories."));
|
||||
d->m_displayFeaturesButton->setPopupMode(QToolButton::InstantPopup);
|
||||
d->m_displayFeaturesButton->setProperty("noArrow", true);
|
||||
|
||||
Reference in New Issue
Block a user