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:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "itaskhandler.h"
|
||||
#include "projectexplorerconstants.h"
|
||||
#include "projectexplorericons.h"
|
||||
#include "session.h"
|
||||
#include "task.h"
|
||||
#include "taskhub.h"
|
||||
@@ -39,14 +40,13 @@
|
||||
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/command.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/coreicons.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/itemviews.h>
|
||||
#include <utils/themehelper.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QPainter>
|
||||
@@ -244,7 +244,7 @@ TaskWindow::TaskWindow() : d(new TaskWindowPrivate)
|
||||
d->m_listview->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
Internal::TaskDelegate *tld = new Internal::TaskDelegate(this);
|
||||
d->m_listview->setItemDelegate(tld);
|
||||
d->m_listview->setWindowIcon(QIcon(QLatin1String(Constants::ICON_WINDOW)));
|
||||
d->m_listview->setWindowIcon(Icons::WINDOW.icon());
|
||||
d->m_listview->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
d->m_listview->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
|
||||
@@ -265,12 +265,11 @@ TaskWindow::TaskWindow() : d(new TaskWindowPrivate)
|
||||
d->m_listview->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
d->m_filterWarningsButton = createFilterButton(
|
||||
Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING)),
|
||||
Core::Icons::WARNING.icon(),
|
||||
tr("Show Warnings"), this, [this](bool show) { setShowWarnings(show); });
|
||||
|
||||
d->m_categoriesButton = new QToolButton;
|
||||
d->m_categoriesButton->setIcon(
|
||||
Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
|
||||
d->m_categoriesButton->setIcon(Core::Icons::FILTER.icon());
|
||||
d->m_categoriesButton->setToolTip(tr("Filter by categories"));
|
||||
d->m_categoriesButton->setProperty("noArrow", true);
|
||||
d->m_categoriesButton->setAutoRaise(true);
|
||||
|
||||
Reference in New Issue
Block a user