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:
Alessandro Portale
2015-11-23 16:41:54 +01:00
parent 00c75cd7eb
commit 033862f305
139 changed files with 1090 additions and 629 deletions
+2 -4
View File
@@ -33,8 +33,8 @@
#include "historycompleter.h"
#include "hostosinfo.h"
#include "qtcassert.h"
#include "themehelper.h"
#include "stylehelper.h"
#include "utilsicons.h"
#include <QAbstractItemView>
#include <QDebug>
@@ -365,9 +365,7 @@ void FancyLineEdit::setFiltering(bool on)
QLatin1String("edit-clear-locationbar-rtl") :
QLatin1String("edit-clear-locationbar-ltr"),
QIcon::fromTheme(QLatin1String("edit-clear"),
ThemeHelper::recoloredPixmap(
QLatin1String(":/core/images/editclear.png"),
ThemeHelper::inputfieldIconColor())));
Icons::EDIT_CLEAR.pixmap()));
setButtonPixmap(Right, icon.pixmap(16));
setButtonVisible(Right, true);
+3 -1
View File
@@ -30,6 +30,8 @@
#include "historycompleter.h"
#include "fancylineedit.h"
#include "theme/theme.h"
#include "utilsicons.h"
#include "qtcassert.h"
@@ -69,7 +71,7 @@ class HistoryLineDelegate : public QItemDelegate
public:
HistoryLineDelegate(QObject *parent)
: QItemDelegate(parent)
, pixmap(QLatin1String(":/core/images/editclear.png"))
, pixmap(Icons::EDIT_CLEAR.pixmap())
{}
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
@@ -28,7 +28,8 @@
**
****************************************************************************/
#include "themehelper.h"
#include "icon.h"
#include "qtcassert.h"
#include "theme/theme.h"
#include "stylehelper.h"
@@ -37,6 +38,7 @@
#include <QImage>
#include <QMetaEnum>
#include <QPainter>
#include <QPaintEngine>
namespace Utils {
@@ -57,29 +59,13 @@ static QPixmap maskToColorAndAlpha(const QPixmap &mask, const QColor &color)
typedef QPair<QPixmap, QColor> MaskAndColor;
typedef QList<MaskAndColor> MasksAndColors;
static MasksAndColors masksAndColors(const QString &mask, int dpr)
static MasksAndColors masksAndColors(const Icon &icon, int dpr)
{
MasksAndColors result;
const QStringList list = mask.split(QLatin1Char(','));
for (QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
const QStringList items = (*it).split(QLatin1Char('|'));
const QString fileName = items.first().trimmed();
QColor color = creatorTheme()->color(Theme::IconsBaseColor);
if (items.count() > 1) {
const QString colorName = items.at(1);
static const QMetaObject &m = Theme::staticMetaObject;
static const QMetaEnum colorEnum = m.enumerator(m.indexOfEnumerator("Color"));
bool keyFound = false;
const int colorEnumKey = colorEnum.keyToValue(colorName.toLatin1().constData(), &keyFound);
if (keyFound) {
color = creatorTheme()->color(static_cast<Theme::Color>(colorEnumKey));
} else {
const QColor colorFromName(colorName);
if (colorFromName.isValid())
color = colorFromName;
}
}
const QString dprFileName = StyleHelper::availableImageResolutions(fileName).contains(dpr) ?
for (const IconMaskAndColor &i: icon) {
const QString &fileName = i.first;
const QColor color = creatorTheme()->color(i.second);
const QString dprFileName = StyleHelper::availableImageResolutions(i.first).contains(dpr) ?
StyleHelper::imageFileWithResolution(fileName, dpr) : fileName;
result.append(qMakePair(QPixmap(dprFileName), color));
}
@@ -106,7 +92,7 @@ static QPixmap combinedMask(const MasksAndColors &masks)
QPixmap result(masks.first().first);
QPainter p(&result);
p.setCompositionMode(QPainter::CompositionMode_Darken);
MasksAndColors::const_iterator maskImage = masks.constBegin();
auto maskImage = masks.constBegin();
maskImage++;
for (;maskImage != masks.constEnd(); ++maskImage) {
p.save();
@@ -120,7 +106,7 @@ static QPixmap combinedMask(const MasksAndColors &masks)
return result;
}
static QPixmap masksToIcon(const MasksAndColors &masks, const QPixmap &combinedMask)
static QPixmap masksToIcon(const MasksAndColors &masks, const QPixmap &combinedMask, bool shadow)
{
QPixmap result(combinedMask.size());
result.setDevicePixelRatio(combinedMask.devicePixelRatio());
@@ -140,6 +126,7 @@ static QPixmap masksToIcon(const MasksAndColors &masks, const QPixmap &combinedM
p.drawPixmap(0, 0, maskToColorAndAlpha((*maskImage).first, (*maskImage).second));
}
if (shadow) {
const QPixmap shadowMask = maskToColorAndAlpha(combinedMask, Qt::black);
p.setCompositionMode(QPainter::CompositionMode_DestinationOver);
p.setOpacity(0.05);
@@ -150,44 +137,86 @@ static QPixmap masksToIcon(const MasksAndColors &masks, const QPixmap &combinedM
p.drawPixmap(QPointF(-0.501, 0.5), shadowMask);
p.setOpacity(0.2);
p.drawPixmap(0, 1, shadowMask);
}
p.end();
return result;
}
QIcon ThemeHelper::themedIcon(const QString &mask)
static QPixmap combinedPlainPixmaps(const QVector<IconMaskAndColor> &images)
{
QPixmap result(StyleHelper::dpiSpecificImageFile(images.first().first));
auto pixmap = images.constBegin();
pixmap++;
for (;pixmap != images.constEnd(); ++pixmap) {
const QPixmap overlay(StyleHelper::dpiSpecificImageFile((*pixmap).first));
result.paintEngine()->painter()->drawPixmap(0, 0, overlay);
}
return result;
}
Icon::Icon()
{
}
Icon::Icon(std::initializer_list<IconMaskAndColor> args, Style style)
: QVector<IconMaskAndColor>(args)
, m_style(style)
{
}
Icon::Icon(const QString &imageFileName)
: m_style(Style::Plain)
{
append({imageFileName, Theme::Color(-1)});
}
QIcon Icon::icon() const
{
if (isEmpty()) {
return QIcon();
} else if (m_style == Style::Plain) {
return QIcon(combinedPlainPixmaps(*this));
} else {
QIcon result;
const MasksAndColors masks = masksAndColors(mask, qRound(qApp->devicePixelRatio()));
const MasksAndColors masks = masksAndColors(*this, qRound(qApp->devicePixelRatio()));
const QPixmap combinedMask = Utils::combinedMask(masks);
result.addPixmap(masksToIcon(masks, combinedMask));
result.addPixmap(masksToIcon(masks, combinedMask, m_style == Style::TintedWithShadow));
QColor disabledColor = creatorTheme()->palette().mid().color();
disabledColor.setAlphaF(0.6);
result.addPixmap(maskToColorAndAlpha(combinedMask, disabledColor), QIcon::Disabled);
return result;
}
}
QPixmap ThemeHelper::themedIconPixmap(const QString &mask)
QPixmap Icon::pixmap() const
{
if (isEmpty()) {
return QPixmap();
} else if (m_style == Style::Plain) {
return combinedPlainPixmaps(*this);
} else {
const MasksAndColors masks =
masksAndColors(mask, qRound(qApp->devicePixelRatio()));
masksAndColors(*this, qRound(qApp->devicePixelRatio()));
const QPixmap combinedMask = Utils::combinedMask(masks);
return masksToIcon(masks, combinedMask);
return masksToIcon(masks, combinedMask, m_style == Style::TintedWithShadow);
}
}
QPixmap ThemeHelper::recoloredPixmap(const QString &maskImage, const QColor &color)
QString Icon::imageFileName() const
{
return maskToColorAndAlpha(QPixmap(Utils::StyleHelper::dpiSpecificImageFile(maskImage)), color);
QTC_ASSERT(length() == 1, return QString());
return first().first;
}
QColor ThemeHelper::inputfieldIconColor()
Icon& Icon::operator=(const Icon &other)
{
// See QLineEdit::paintEvent
QColor color = QApplication::palette().text().color();
color.setAlpha(128);
return color;
clear();
append(other);
m_style = other.m_style;
return *this;
}
} // namespace Utils
@@ -32,29 +32,47 @@
#define THEMEHELPER_H
#include "utils_global.h"
#include "theme/theme.h"
#include <QPair>
#include <QVector>
QT_FORWARD_DECLARE_CLASS(QColor)
QT_FORWARD_DECLARE_CLASS(QIcon)
QT_FORWARD_DECLARE_CLASS(QPixmap)
QT_FORWARD_DECLARE_CLASS(QString)
namespace Utils {
class QTCREATOR_UTILS_EXPORT ThemeHelper
typedef QPair<QString, Theme::Color> IconMaskAndColor;
// Returns a recolored icon with shadow and custom disabled state for a
// series of grayscalemask|Theme::Color mask pairs
class QTCREATOR_UTILS_EXPORT Icon : public QVector<IconMaskAndColor>
{
public:
// Returns a recolored icon with shadow and custom disabled state for a
// grayscale mask. The mask can range from a single image filename to
// a list of filename|color,... pairs.
// The color can be a Theme::Color enum key name. If invalid, it is run
// through QColor(const QString &name).
static QIcon themedIcon(const QString &mask);
// Same as themedIcon() but without disabled state.
static QPixmap themedIconPixmap(const QString &mask);
enum class Style {
Plain,
Tinted,
TintedWithShadow
};
// Simple recoloring of a mask. No shadow. maskImage is a single file.
static QPixmap recoloredPixmap(const QString &maskImage, const QColor &color);
Icon();
Icon(std::initializer_list<IconMaskAndColor> args, Style style = Style::TintedWithShadow);
Icon(const QString &imageFileName);
static QColor inputfieldIconColor();
QIcon icon() const;
// Same as icon() but without disabled state.
QPixmap pixmap() const;
// Try to avoid it. it is just there for special API cases in Qt Creator
// where icons are still defined as filename.
QString imageFileName() const;
Icon& Icon::operator=(const Icon &other);
private:
Style m_style = Style::Plain;
};
} // namespace Utils
+5 -4
View File
@@ -89,12 +89,12 @@ SOURCES += $$PWD/environment.cpp \
$$PWD/proxycredentialsdialog.cpp \
$$PWD/macroexpander.cpp \
$$PWD/theme/theme.cpp \
$$PWD/themehelper.cpp \
$$PWD/progressindicator.cpp \
$$PWD/fadingindicator.cpp \
$$PWD/overridecursor.cpp \
$$PWD/categorysortfiltermodel.cpp \
$$PWD/dropsupport.cpp
$$PWD/dropsupport.cpp \
$$PWD/icon.cpp
win32:SOURCES += $$PWD/consoleprocess_win.cpp
else:SOURCES += $$PWD/consoleprocess_unix.cpp
@@ -194,13 +194,14 @@ HEADERS += \
$$PWD/macroexpander.h \
$$PWD/theme/theme.h \
$$PWD/theme/theme_p.h \
$$PWD/themehelper.h \
$$PWD/progressindicator.h \
$$PWD/fadingindicator.h \
$$PWD/executeondestruction.h \
$$PWD/overridecursor.h \
$$PWD/categorysortfiltermodel.h \
$$PWD/dropsupport.h
$$PWD/dropsupport.h \
$$PWD/utilsicons.h \
$$PWD/icon.h
FORMS += $$PWD/filewizardpage.ui \
$$PWD/projectintropage.ui \
+45
View File
@@ -0,0 +1,45 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef UTILSICONS_H
#define UTILSICONS_H
#include "icon.h"
namespace Utils {
namespace Icons {
const Utils::Icon EDIT_CLEAR({
{QLatin1String(":/core/images/editclear.png"), Utils::Theme::BackgroundColorHover}}, Utils::Icon::Style::Tinted);
} // namespace Icons
} // namespace Utils
#endif // UTILSICONS_H
+2 -1
View File
@@ -29,7 +29,8 @@ HEADERS += \
analyzerutils.h \
detailederrorview.h \
diagnosticlocation.h \
startremotedialog.h
startremotedialog.h \
analyzericons.h
RESOURCES += \
analyzerbase.qrc
@@ -16,6 +16,7 @@ QtcPlugin {
"analyzerbase.qrc",
"analyzerbase_global.h",
"analyzerconstants.h",
"analyzericons",
"analyzermanager.cpp",
"analyzermanager.h",
"analyzerplugin.cpp",
@@ -53,9 +53,6 @@ const char G_ANALYZER_TOOLS[] = "Menu.Group.Analyzer.Tools";
const char G_ANALYZER_REMOTE_TOOLS[] = "Menu.Group.Analyzer.RemoteTools";
const char G_ANALYZER_OPTIONS[] = "Menu.Group.Analyzer.Options";
// Manager controls.
const char ANALYZER_CONTROL_START_ICON[] = ":/images/analyzer_overlay_small.png,:/core/images/run_overlay_small.png|IconsRunColor";
const char ANALYZERTASK_ID[] = "Analyzer.TaskId";
} // namespace Constants
+46
View File
@@ -0,0 +1,46 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef ANALYZERICONS_H
#define ANALYZERICONS_H
#include <utils/icon.h>
namespace Analyzer {
namespace Icons {
const Utils::Icon ANALYZER_CONTROL_START({
{QLatin1String(":/images/analyzer_overlay_small.png"), Utils::Theme::IconsBaseColor},
{QLatin1String(":/core/images/run_overlay_small.png"), Utils::Theme::IconsRunColor}});
} // namespace Icons
} // namespace Analyzer
#endif // ANALYZERICONS_H
+4 -5
View File
@@ -31,6 +31,7 @@
#include "analyzermanager.h"
#include "analyzericons.h"
#include "analyzerplugin.h"
#include "analyzerstartparameters.h"
#include "ianalyzertool.h"
@@ -49,6 +50,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/project.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/session.h>
@@ -61,7 +63,6 @@
#include <utils/qtcassert.h>
#include <utils/checkablemessagebox.h>
#include <utils/statuslabel.h>
#include <utils/themehelper.h>
#include <QVariant>
#include <QDebug>
@@ -241,16 +242,14 @@ void AnalyzerManagerPrivate::setupActions()
menubar->addMenu(mtools, m_menu);
m_startAction = new QAction(tr("Start"), m_menu);
m_startAction->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(ANALYZER_CONTROL_START_ICON)));
m_startAction->setIcon(Analyzer::Icons::ANALYZER_CONTROL_START.icon());
ActionManager::registerAction(m_startAction, "Analyzer.Start");
connect(m_startAction, &QAction::triggered,
this, &AnalyzerManagerPrivate::startCurrentTool);
m_stopAction = new QAction(tr("Stop"), m_menu);
m_stopAction->setEnabled(false);
m_stopAction->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(ProjectExplorer::Constants::ICON_STOP_SMALL)));
m_stopAction->setIcon(ProjectExplorer::Icons::STOP_SMALL.icon());
command = ActionManager::registerAction(m_stopAction, "Analyzer.Stop");
m_menu->addAction(command, G_ANALYZER_CONTROL);
@@ -29,6 +29,7 @@
**
****************************************************************************/
#include "analyzericons.h"
#include "analyzerruncontrol.h"
#include "ianalyzertool.h"
#include "analyzermanager.h"
@@ -51,7 +52,7 @@ AnalyzerRunControl::AnalyzerRunControl(const AnalyzerStartParameters &sp,
RunConfiguration *runConfiguration)
: RunControl(runConfiguration, sp.runMode)
{
setIcon(QLatin1String(Constants::ANALYZER_CONTROL_START_ICON));
setIcon(Icons::ANALYZER_CONTROL_START);
m_sp = sp;
@@ -32,7 +32,7 @@
#include "diagnosticlocation.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/editormanager/editormanager.h>
#include <utils/qtcassert.h>
@@ -132,7 +132,7 @@ DetailedErrorView::DetailedErrorView(QWidget *parent) :
setItemDelegateForColumn(LocationColumn, new Internal::DetailedErrorDelegate(this));
m_copyAction->setText(tr("Copy"));
m_copyAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_COPY)));
m_copyAction->setIcon(Core::Icons::COPY.icon());
m_copyAction->setShortcut(QKeySequence::Copy);
m_copyAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
connect(m_copyAction, &QAction::triggered, [this] {
@@ -36,7 +36,7 @@
#include "androidmanager.h"
#include "ui_androidbuildapkwidget.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
@@ -44,7 +44,6 @@
#include <utils/fancylineedit.h>
#include <utils/pathchooser.h>
#include <utils/themehelper.h>
#include <QFileDialog>
@@ -91,12 +90,10 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
m_ui->KeystoreLocationPathChooser->setInitialBrowsePathBackup(QDir::homePath());
m_ui->KeystoreLocationPathChooser->setPromptDialogFilter(tr("Keystore files (*.keystore *.jks)"));
m_ui->KeystoreLocationPathChooser->setPromptDialogTitle(tr("Select Keystore File"));
m_ui->signingDebugWarningIcon->setPixmap(
Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
m_ui->signingDebugWarningIcon->setPixmap(Core::Icons::WARNING.pixmap());
m_ui->signingDebugWarningIcon->hide();
m_ui->signingDebugWarningLabel->hide();
m_ui->signingDebugDeployErrorIcon->setPixmap(
Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_ERROR)));
m_ui->signingDebugDeployErrorIcon->setPixmap(Core::Icons::ERROR.pixmap());
signPackageCheckBoxToggled(m_step->signPackage());
m_ui->useGradleCheckBox->setChecked(m_step->useGradle());
@@ -35,7 +35,7 @@
#include "androidmanager.h"
#include "androidqtsupport.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/infobar.h>
#include <coreplugin/editormanager/ieditor.h>
@@ -50,7 +50,6 @@
#include <texteditor/texteditoractionhandler.h>
#include <texteditor/texteditor.h>
#include <utils/algorithm.h>
#include <utils/themehelper.h>
#include <QLineEdit>
#include <QFileInfo>
@@ -167,8 +166,7 @@ void AndroidManifestEditorWidget::initializePage()
m_packageNameWarning->setVisible(false);
m_packageNameWarningIcon = new QLabel;
m_packageNameWarningIcon->setPixmap(
Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
m_packageNameWarningIcon->setPixmap(Core::Icons::WARNING.pixmap());
m_packageNameWarningIcon->setVisible(false);
m_packageNameWarningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+2 -3
View File
@@ -33,8 +33,7 @@
#include "androidconfigurations.h"
#include <utils/detailswidget.h>
#include <utils/themehelper.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/kit.h>
@@ -93,7 +92,7 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
: Utils::DetailsWidget(parent)
{
setSummaryText(QLatin1String("<b>Android has not been configured. Create Android kits.</b>"));
setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING)));
setIcon(Core::Icons::WARNING.icon());
//detailsWidget->setState(Utils::DetailsWidget::NoSummary);
QWidget *mainWidget = new QWidget(this);
setWidget(mainWidget);
+2 -1
View File
@@ -35,6 +35,7 @@
#include "androidrunner.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorericons.h>
using namespace ProjectExplorer;
@@ -46,7 +47,7 @@ AndroidRunControl::AndroidRunControl(AndroidRunConfiguration *rc)
, m_runner(new AndroidRunner(this, rc, ProjectExplorer::Constants::NORMAL_RUN_MODE))
, m_running(false)
{
setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
setIcon(Icons::RUN_SMALL);
}
AndroidRunControl::~AndroidRunControl()
@@ -36,11 +36,10 @@
#include "androidconstants.h"
#include "androidtoolchain.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <utils/environment.h>
#include <utils/hostosinfo.h>
#include <utils/pathchooser.h>
#include <utils/themehelper.h>
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/kitinformation.h>
@@ -176,13 +175,11 @@ AndroidSettingsWidget::AndroidSettingsWidget(QWidget *parent)
m_ui->downloadAntToolButton->setVisible(!Utils::HostOsInfo::isLinuxHost());
m_ui->downloadOpenJDKToolButton->setVisible(!Utils::HostOsInfo::isLinuxHost());
const QPixmap warningPixmap = Utils::ThemeHelper::themedIconPixmap(
QLatin1String(Core::Constants::ICON_WARNING));
const QPixmap warningPixmap = Core::Icons::WARNING.pixmap();
m_ui->jdkWarningIconLabel->setPixmap(warningPixmap);
m_ui->kitWarningIconLabel->setPixmap(warningPixmap);
const QPixmap errorPixmap = Utils::ThemeHelper::themedIconPixmap(
QLatin1String(Core::Constants::ICON_ERROR));
const QPixmap errorPixmap = Core::Icons::ERROR.pixmap();
m_ui->sdkWarningIconLabel->setPixmap(errorPixmap);
m_ui->gdbWarningIconLabel->setPixmap(errorPixmap);
m_ui->ndkWarningIconLabel->setPixmap(errorPixmap);
+2 -4
View File
@@ -31,9 +31,8 @@
#include "avddialog.h"
#include "androidconfigurations.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <utils/tooltip/tooltip.h>
#include <utils/themehelper.h>
#include <QKeyEvent>
#include <QMessageBox>
@@ -63,8 +62,7 @@ AvdDialog::AvdDialog(int minApiLevel, const QString &targetArch, const AndroidCo
m_avdDialog.nameLineEdit->setValidator(v);
m_avdDialog.nameLineEdit->installEventFilter(this);
m_avdDialog.warningIcon->setPixmap(Utils::ThemeHelper::themedIconPixmap(
QLatin1String(Core::Constants::ICON_WARNING)));
m_avdDialog.warningIcon->setPixmap(Core::Icons::WARNING.pixmap());
updateApiLevelComboBox();
@@ -31,9 +31,8 @@
#include "baremetalrunconfigurationwidget.h"
#include "baremetalrunconfiguration.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <utils/detailswidget.h>
#include <utils/themehelper.h>
#include <QLineEdit>
#include <QFormLayout>
@@ -91,8 +90,7 @@ void BareMetalRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout)
{
QHBoxLayout * const hl = new QHBoxLayout;
hl->addStretch();
d->disabledIcon.setPixmap(Utils::ThemeHelper::themedIconPixmap(
QLatin1String(Core::Constants::ICON_WARNING)));
d->disabledIcon.setPixmap(Core::Icons::WARNING.pixmap());
hl->addWidget(&d->disabledIcon);
d->disabledReason.setVisible(false);
hl->addWidget(&d->disabledReason);
+3 -6
View File
@@ -32,14 +32,11 @@
#include "constants.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <QString>
#include <QApplication>
#include <utils/tooltip/tooltip.h>
#include <utils/themehelper.h>
namespace ClangCodeModel {
namespace {
@@ -74,8 +71,8 @@ ClangTextMark::ClangTextMark(const QString &fileName, int lineNumber, ClangBackE
void ClangTextMark::setIcon(ClangBackEnd::DiagnosticSeverity severity)
{
static const QIcon errorIcon{Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_ERROR))};
static const QIcon warningIcon{Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING))};
static const QIcon errorIcon{Core::Icons::ERROR.icon()};
static const QIcon warningIcon{Core::Icons::WARNING.icon()};
if (isWarningOrNote(severity))
TextMark::setIcon(warningIcon);
@@ -34,7 +34,7 @@
#include "cmakeproject.h"
#include "cmakeprojectconstants.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/helpmanager.h>
#include <qtsupport/qtkitinformation.h>
#include <projectexplorer/localenvironmentaspect.h>
@@ -241,7 +241,7 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
QToolButton *resetButton = new QToolButton();
resetButton->setToolTip(tr("Reset to Default"));
resetButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_RESET)));
resetButton->setIcon(Core::Icons::RESET.icon());
QHBoxLayout *boxlayout = new QHBoxLayout();
boxlayout->addWidget(m_workingDirectoryEdit);
-44
View File
@@ -184,50 +184,6 @@ const char G_HELP_SUPPORT[] = "QtCreator.Group.Help.Supprt";
const char G_HELP_ABOUT[] = "QtCreator.Group.Help.About";
const char G_HELP_UPDATES[] = "QtCreator.Group.Help.Updates";
const char ICON_MINUS[] = ":/core/images/minus.png";
const char ICON_PLUS[] = ":/core/images/plus.png";
const char ICON_NEWFILE[] = ":/core/images/filenew.png";
const char ICON_OPENFILE[] = ":/core/images/fileopen.png";
const char ICON_SAVEFILE[] = ":/core/images/filesave.png";
const char ICON_UNDO[] = ":/core/images/undo.png";
const char ICON_REDO[] = ":/core/images/redo.png";
const char ICON_COPY[] = ":/core/images/editcopy.png";
const char ICON_PASTE[] = ":/core/images/editpaste.png";
const char ICON_CUT[] = ":/core/images/editcut.png";
const char ICON_NEXT[] = ":/core/images/next.png|IconsNavigationArrowsColor";
const char ICON_PREV[] = ":/core/images/prev.png|IconsNavigationArrowsColor";
const char ICON_DIR[] = ":/core/images/dir.png";
const char ICON_CLEAN_PANE[] = ":/core/images/clean_pane_small.png";
const char ICON_CLEAR[] = ":/core/images/clear.png";
const char ICON_RESET[] = ":/core/images/reset.png";
const char ICON_RELOAD_GRAY[] = ":/core/images/reload_gray.png";
const char ICON_MAGNIFIER[] = ":/core/images/magnifier.png";
const char ICON_TOGGLE_SIDEBAR[] = ":/core/images/sidebaricon.png";
const char ICON_BUTTON_CLOSE[] = ":/core/images/button_close.png";
const char ICON_CLOSE_BUTTON[] = ":/core/images/closebutton.png";
const char ICON_DARK_CLOSE_BUTTON[] = ":/core/images/darkclosebutton.png";
const char ICON_DARK_CLOSE[] = ":/core/images/darkclose.png";
const char ICON_SPLIT_HORIZONTAL[] = ":/core/images/splitbutton_horizontal.png";
const char ICON_SPLIT_VERTICAL[] = ":/core/images/splitbutton_vertical.png";
const char ICON_CLOSE_SPLIT_TOP[] = ":/core/images/splitbutton_closetop.png";
const char ICON_CLOSE_SPLIT_BOTTOM[] = ":/core/images/splitbutton_closebottom.png";
const char ICON_CLOSE_SPLIT_LEFT[] = ":/core/images/splitbutton_closeleft.png";
const char ICON_CLOSE_SPLIT_RIGHT[] = ":/core/images/splitbutton_closeright.png";
const char ICON_FILTER[] = ":/core/images/filtericon.png";
const char ICON_LINK[] = ":/core/images/linkicon.png";
const char ICON_PAUSE[] = ":/core/images/pause.png";
const char ICON_QTLOGO_32[] = ":/core/images/logo/32/QtProject-qtcreator.png";
const char ICON_QTLOGO_64[] = ":/core/images/logo/64/QtProject-qtcreator.png";
const char ICON_QTLOGO_128[] = ":/core/images/logo/128/QtProject-qtcreator.png";
const char ICON_WARNING[] = ":/core/images/warning.png|IconsWarningColor";
const char ICON_ERROR[] = ":/core/images/error.png|IconsErrorColor";
const char ICON_INFO[] = ":/core/images/info.png|IconsInfoColor";
const char ICON_DEBUG_START_SMALL[] = ":/core/images/debugger_overlay_small.png|IconsDebugColor,:/core/images/run_overlay_small.png|IconsRunColor";
const char ICON_DEBUG_EXIT_SMALL[] = ":/core/images/debugger_overlay_small.png|IconsDebugColor,:/core/images/stop_overlay_small.png|IconsStopColor";
const char ICON_DEBUG_INTERRUPT_SMALL[] = ":/core/images/debugger_overlay_small.png|IconsDebugColor,:/core/images/interrupt_overlay_small.png|IconsInterruptColor";
const char ICON_DEBUG_CONTINUE_SMALL[] = ":/core/images/debugger_overlay_small.png|IconsDebugColor,:/core/images/continue_overlay_small.png|IconsRunColor";
const char ICON_ZOOM[] = ":/core/images/zoom.png";
const char WIZARD_CATEGORY_QT[] = "R.Qt";
const char WIZARD_TR_CATEGORY_QT[] = QT_TRANSLATE_NOOP("Core", "Qt");
const char WIZARD_KIND_UNKNOWN[] = "unknown";
+154
View File
@@ -0,0 +1,154 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef COREICONS_H
#define COREICONS_H
#include <utils/icon.h>
namespace Core {
namespace Icons {
const Utils::Icon NEWFILE(
QLatin1String(":/core/images/filenew.png"));
const Utils::Icon OPENFILE(
QLatin1String(":/core/images/fileopen.png"));
const Utils::Icon SAVEFILE(
QLatin1String(":/core/images/filesave.png"));
const Utils::Icon UNDO(
QLatin1String(":/core/images/undo.png"));
const Utils::Icon REDO(
QLatin1String(":/core/images/redo.png"));
const Utils::Icon COPY(
QLatin1String(":/core/images/editcopy.png"));
const Utils::Icon PASTE(
QLatin1String(":/core/images/editpaste.png"));
const Utils::Icon CUT(
QLatin1String(":/core/images/editcut.png"));
const Utils::Icon DIR(
QLatin1String(":/core/images/dir.png"));
const Utils::Icon CLEAR(
QLatin1String(":/core/images/clear.png"));
const Utils::Icon RESET(
QLatin1String(":/core/images/reset.png"));
const Utils::Icon CLOSE_BUTTON(
QLatin1String(":/core/images/closebutton.png"));
const Utils::Icon DARK_CLOSE_BUTTON(
QLatin1String(":/core/images/darkclosebutton.png"));
const Utils::Icon DARK_CLOSE(
QLatin1String(":/core/images/darkclose.png"));
const Utils::Icon LOCKED(
QLatin1String(":/core/images/locked.png"));
const Utils::Icon UNLOCKED(
QLatin1String(":/core/images/unlocked.png"));
const Utils::Icon FIND_CASE_INSENSITIVELY(
QLatin1String(":/find/images/casesensitively.png"));
const Utils::Icon FIND_WHOLE_WORD(
QLatin1String(":/find/images/wholewords.png"));
const Utils::Icon FIND_REGEXP(
QLatin1String(":/find/images/regexp.png"));
const Utils::Icon FIND_PRESERVE_CASE(
QLatin1String(":/find/images/preservecase.png"));
const Utils::Icon QTLOGO_32(
QLatin1String(":/core/images/logo/32/QtProject-qtcreator.png"));
const Utils::Icon QTLOGO_64(
QLatin1String(":/core/images/logo/64/QtProject-qtcreator.png"));
const Utils::Icon QTLOGO_128(
QLatin1String(":/core/images/logo/128/QtProject-qtcreator.png"));
const Utils::Icon ARROW_UP({
{QLatin1String(":/core/images/arrowup.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon ARROW_DOWN({
{QLatin1String(":/core/images/arrowdown.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon MINUS({
{QLatin1String(":/core/images/minus.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon PLUS({
{QLatin1String(":/core/images/plus.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon NEXT({
{QLatin1String(":/core/images/next.png"), Utils::Theme::IconsNavigationArrowsColor}});
const Utils::Icon PREV({
{QLatin1String(":/core/images/prev.png"), Utils::Theme::IconsNavigationArrowsColor}});
const Utils::Icon MAGNIFIER({
{QLatin1String(":/core/images/magnifier.png"), Utils::Theme::BackgroundColorHover}}, Utils::Icon::Style::Tinted);
const Utils::Icon CLEAN_PANE({
{QLatin1String(":/core/images/clean_pane_small.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon RELOAD_GRAY({
{QLatin1String(":/core/images/reload_gray.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon TOGGLE_SIDEBAR({
{QLatin1String(":/core/images/sidebaricon.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon BUTTON_CLOSE({
{QLatin1String(":/core/images/button_close.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon SPLIT_HORIZONTAL({
{QLatin1String(":/core/images/splitbutton_horizontal.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon SPLIT_VERTICAL({
{QLatin1String(":/core/images/splitbutton_vertical.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon CLOSE_SPLIT_TOP({
{QLatin1String(":/core/images/splitbutton_closetop.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon CLOSE_SPLIT_BOTTOM({
{QLatin1String(":/core/images/splitbutton_closebottom.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon CLOSE_SPLIT_LEFT({
{QLatin1String(":/core/images/splitbutton_closeleft.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon CLOSE_SPLIT_RIGHT({
{QLatin1String(":/core/images/splitbutton_closeright.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon FILTER({
{QLatin1String(":/core/images/filtericon.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon LINK({
{QLatin1String(":/core/images/linkicon.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon PAUSE({
{QLatin1String(":/core/images/pause.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon WARNING({
{QLatin1String(":/core/images/warning.png"), Utils::Theme::IconsWarningColor}});
const Utils::Icon ERROR({
{QLatin1String(":/core/images/error.png"), Utils::Theme::IconsErrorColor}});
const Utils::Icon INFO({
{QLatin1String(":/core/images/info.png"), Utils::Theme::IconsInfoColor}});
const Utils::Icon EXPAND({
{QLatin1String(":/find/images/expand.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon DEBUG_START_SMALL({
{QLatin1String(":/core/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor},
{QLatin1String(":/core/images/run_overlay_small.png"), Utils::Theme::IconsRunColor}});
const Utils::Icon DEBUG_EXIT_SMALL({
{QLatin1String(":/core/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor},
{QLatin1String(":/core/images/stop_overlay_small.png"), Utils::Theme::IconsStopColor}});
const Utils::Icon DEBUG_INTERRUPT_SMALL({
{QLatin1String(":/core/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor},
{QLatin1String(":/core/images/interrupt_overlay_small.png"), Utils::Theme::IconsInterruptColor}});
const Utils::Icon DEBUG_CONTINUE_SMALL({
{QLatin1String(":/core/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor},
{QLatin1String(":/core/images/continue_overlay_small.png"), Utils::Theme::IconsRunColor}});
const Utils::Icon ZOOM({
{QLatin1String(":/core/images/zoom.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon TOOLBAR_EXTENSION({
{QLatin1String(":/core/images/extension.png"), Utils::Theme::IconsBaseColor}});
} // namespace Icons
} // namespace Core
#endif // COREICONS_H
+2 -1
View File
@@ -232,7 +232,8 @@ HEADERS += corejsextensions.h \
themeeditor/themesettingsitemdelegate.h \
messagebox.h \
iwelcomepage.h \
systemsettings.h
systemsettings.h \
coreicons.h
FORMS += dialogs/newdialog.ui \
dialogs/saveitemsdialog.ui \
+1
View File
@@ -38,6 +38,7 @@ QtcPlugin {
"core.qrc",
"core_global.h",
"coreconstants.h",
"coreicons.h",
"corejsextensions.cpp", "corejsextensions.h",
"coreplugin.cpp", "coreplugin.h",
"designmode.cpp", "designmode.h",
+2 -2
View File
@@ -31,7 +31,7 @@
#include "newdialog.h"
#include "ui_newdialog.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
@@ -268,7 +268,7 @@ void NewDialog::setWizardFactories(QList<IWizardFactory *> factories,
parentItem->appendRow(filesKindItem);
if (m_dummyIcon.isNull())
m_dummyIcon = QIcon(QLatin1String(Core::Constants::ICON_NEWFILE));
m_dummyIcon = Core::Icons::NEWFILE.icon();
QStringList availablePlatforms = IWizardFactory::allAvailablePlatforms();
m_ui->comboBox->addItem(tr("All Templates"), QString());
@@ -32,6 +32,7 @@
#include "ieditor.h"
#include <coreplugin/documentmanager.h>
#include <coreplugin/idocument.h>
#include <coreplugin/coreicons.h>
#include <utils/algorithm.h>
#include <utils/dropsupport.h>
@@ -125,8 +126,8 @@ public:
};
DocumentModelPrivate::DocumentModelPrivate() :
m_lockedIcon(QLatin1String(":/core/images/locked.png")),
m_unlockedIcon(QLatin1String(":/core/images/unlocked.png"))
m_lockedIcon(Icons::LOCKED.icon()),
m_unlockedIcon(Icons::UNLOCKED.icon())
{
}
@@ -41,7 +41,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/dialogs/openwithdialog.h>
#include <coreplugin/dialogs/readonlyfilesdialog.h>
#include <coreplugin/documentmanager.h>
@@ -73,7 +73,6 @@
#include <utils/mimetypes/mimetype.h>
#include <utils/qtcassert.h>
#include <utils/overridecursor.h>
#include <utils/themehelper.h>
#include <QClipboard>
#include <QDateTime>
@@ -247,8 +246,8 @@ EditorManagerPrivate::EditorManagerPrivate(QObject *parent) :
m_closeAllEditorsExceptVisibleAction(new QAction(EditorManager::tr("Close All Except Visible"), this)),
m_gotoNextDocHistoryAction(new QAction(EditorManager::tr("Next Open Document in History"), this)),
m_gotoPreviousDocHistoryAction(new QAction(EditorManager::tr("Previous Open Document in History"), this)),
m_goBackAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_PREV)), EditorManager::tr("Go Back"), this)),
m_goForwardAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_NEXT)), EditorManager::tr("Go Forward"), this)),
m_goBackAction(new QAction(Icons::PREV.icon(), EditorManager::tr("Go Back"), this)),
m_goForwardAction(new QAction(Icons::NEXT.icon(), EditorManager::tr("Go Forward"), this)),
m_copyFilePathContextAction(new QAction(EditorManager::tr("Copy Full Path"), this)),
m_copyLocationContextAction(new QAction(EditorManager::tr("Copy Path and Line Number"), this)),
m_copyFileNameContextAction(new QAction(EditorManager::tr("Copy File Name"), this)),
@@ -36,7 +36,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editortoolbar.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/infobar.h>
#include <coreplugin/locator/locatorconstants.h>
@@ -45,7 +45,6 @@
#include <coreplugin/findplaceholder.h>
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
#include <utils/themehelper.h>
#include <QDebug>
@@ -704,15 +703,11 @@ void SplitterOrView::split(Qt::Orientation orientation)
view->view()->setCurrentEditor(duplicate);
if (orientation == Qt::Horizontal) {
view->view()->setCloseSplitIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
otherView->view()->setCloseSplitIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_RIGHT)));
view->view()->setCloseSplitIcon(Icons::CLOSE_SPLIT_LEFT.icon());
otherView->view()->setCloseSplitIcon(Icons::CLOSE_SPLIT_RIGHT.icon());
} else {
view->view()->setCloseSplitIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
otherView->view()->setCloseSplitIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
view->view()->setCloseSplitIcon(Icons::CLOSE_SPLIT_TOP.icon());
otherView->view()->setCloseSplitIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
}
EditorManagerPrivate::activateView(otherView->view());
@@ -801,13 +796,13 @@ void SplitterOrView::unsplit()
QSplitter *parentSplitter = qobject_cast<QSplitter *>(parentWidget());
if (parentSplitter) { // not the toplevel splitterOrView
if (parentSplitter->orientation() == Qt::Horizontal)
Utils::ThemeHelper::themedIcon(QLatin1String(parentSplitter->widget(0) == this ?
Constants::ICON_CLOSE_SPLIT_LEFT
: Constants::ICON_CLOSE_SPLIT_RIGHT));
m_view->setCloseSplitIcon(parentSplitter->widget(0) == this ?
Icons::CLOSE_SPLIT_LEFT.icon()
: Icons::CLOSE_SPLIT_RIGHT.icon());
else
Utils::ThemeHelper::themedIcon(QLatin1String(parentSplitter->widget(0) == this ?
Constants::ICON_CLOSE_SPLIT_TOP
: Constants::ICON_CLOSE_SPLIT_BOTTOM));
m_view->setCloseSplitIcon(parentSplitter->widget(0) == this ?
Icons::CLOSE_SPLIT_TOP.icon()
: Icons::CLOSE_SPLIT_BOTTOM.icon());
}
}
m_layout->setCurrentWidget(m_view);
@@ -33,7 +33,7 @@
#include "ieditor.h"
#include "documentmodel.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
@@ -50,7 +50,7 @@ using namespace Core::Internal;
OpenEditorsWidget::OpenEditorsWidget()
{
setWindowTitle(tr("Open Documents"));
setWindowIcon(QIcon(QLatin1String(Constants::ICON_DIR)));
setWindowIcon(Icons::DIR.icon());
setDragEnabled(true);
setDragDropMode(QAbstractItemView::DragOnly);
+8 -12
View File
@@ -32,7 +32,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/editormanager_p.h>
@@ -43,7 +43,6 @@
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include <QApplication>
#include <QComboBox>
@@ -100,13 +99,13 @@ EditorToolBarPrivate::EditorToolBarPrivate(QWidget *parent, EditorToolBar *q) :
m_lockButton(new QToolButton(q)),
m_dragHandle(new QToolButton(q)),
m_dragHandleMenu(0),
m_goBackAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_PREV)), EditorManager::tr("Go Back"), parent)),
m_goForwardAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_NEXT)), EditorManager::tr("Go Forward"), parent)),
m_goBackAction(new QAction(Icons::PREV.icon(), EditorManager::tr("Go Back"), parent)),
m_goForwardAction(new QAction(Icons::NEXT.icon(), EditorManager::tr("Go Forward"), parent)),
m_backButton(new QToolButton(q)),
m_forwardButton(new QToolButton(q)),
m_splitButton(new QToolButton(q)),
m_horizontalSplitAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)), EditorManager::tr("Split"), parent)),
m_verticalSplitAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_SPLIT_VERTICAL)), EditorManager::tr("Split Side by Side"), parent)),
m_horizontalSplitAction(new QAction(Icons::SPLIT_HORIZONTAL.icon(), EditorManager::tr("Split"), parent)),
m_verticalSplitAction(new QAction(Icons::SPLIT_VERTICAL.icon(), EditorManager::tr("Split Side by Side"), parent)),
m_splitNewWindowAction(new QAction(EditorManager::tr("Open in New Window"), parent)),
m_closeSplitButton(new QToolButton(q)),
m_activeToolBar(0),
@@ -153,8 +152,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_editorList->setContextMenuPolicy(Qt::CustomContextMenu);
d->m_closeEditorButton->setAutoRaise(true);
d->m_closeEditorButton->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_BUTTON_CLOSE)));
d->m_closeEditorButton->setIcon(Icons::BUTTON_CLOSE.icon());
d->m_closeEditorButton->setEnabled(false);
d->m_closeEditorButton->setProperty("showborder", true);
@@ -170,8 +168,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_splitNewWindowAction->setIconVisibleInMenu(false);
}
d->m_splitButton->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)));
d->m_splitButton->setIcon(Icons::SPLIT_HORIZONTAL.icon());
d->m_splitButton->setToolTip(tr("Split"));
d->m_splitButton->setPopupMode(QToolButton::InstantPopup);
d->m_splitButton->setProperty("noArrow", true);
@@ -182,8 +179,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_splitButton->setMenu(splitMenu);
d->m_closeSplitButton->setAutoRaise(true);
d->m_closeSplitButton->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
d->m_closeSplitButton->setIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
QHBoxLayout *toplayout = new QHBoxLayout(this);
toplayout->setSpacing(0);
+10 -13
View File
@@ -32,7 +32,7 @@
#include "ifindfilter.h"
#include "findplugin.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/coreplugin.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
@@ -47,7 +47,6 @@
#include <utils/qtcassert.h>
#include <utils/stylehelper.h>
#include <utils/theme/theme.h>
#include <utils/themehelper.h>
#include <QDebug>
#include <QSettings>
@@ -275,7 +274,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
m_ui.replaceAllButton->setDefaultAction(m_localReplaceAllAction);
m_caseSensitiveAction = new QAction(tr("Case Sensitive"), this);
m_caseSensitiveAction->setIcon(QIcon(QLatin1String(":/find/images/casesensitively.png")));
m_caseSensitiveAction->setIcon(Icons::FIND_CASE_INSENSITIVELY.icon());
m_caseSensitiveAction->setCheckable(true);
m_caseSensitiveAction->setChecked(false);
cmd = ActionManager::registerAction(m_caseSensitiveAction, Constants::CASE_SENSITIVE);
@@ -283,7 +282,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
connect(m_caseSensitiveAction, &QAction::toggled, this, &FindToolBar::setCaseSensitive);
m_wholeWordAction = new QAction(tr("Whole Words Only"), this);
m_wholeWordAction->setIcon(QIcon(QLatin1String(":/find/images/wholewords.png")));
m_wholeWordAction->setIcon(Icons::FIND_WHOLE_WORD.icon());
m_wholeWordAction->setCheckable(true);
m_wholeWordAction->setChecked(false);
cmd = ActionManager::registerAction(m_wholeWordAction, Constants::WHOLE_WORDS);
@@ -291,7 +290,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
connect(m_wholeWordAction, &QAction::toggled, this, &FindToolBar::setWholeWord);
m_regularExpressionAction = new QAction(tr("Use Regular Expressions"), this);
m_regularExpressionAction->setIcon(QIcon(QLatin1String(":/find/images/regexp.png")));
m_regularExpressionAction->setIcon(Icons::FIND_REGEXP.icon());
m_regularExpressionAction->setCheckable(true);
m_regularExpressionAction->setChecked(false);
cmd = ActionManager::registerAction(m_regularExpressionAction, Constants::REGULAR_EXPRESSIONS);
@@ -299,7 +298,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
connect(m_regularExpressionAction, &QAction::toggled, this, &FindToolBar::setRegularExpressions);
m_preserveCaseAction = new QAction(tr("Preserve Case when Replacing"), this);
m_preserveCaseAction->setIcon(QPixmap(QLatin1String(":/find/images/preservecase.png")));
m_preserveCaseAction->setIcon(Icons::FIND_PRESERVE_CASE.icon());
m_preserveCaseAction->setCheckable(true);
m_preserveCaseAction->setChecked(false);
cmd = ActionManager::registerAction(m_preserveCaseAction, Constants::PRESERVE_CASE);
@@ -673,9 +672,7 @@ void FindToolBar::updateIcons()
bool regexp = effectiveFlags & FindRegularExpression;
bool preserveCase = effectiveFlags & FindPreserveCase;
if (!casesensitive && !wholewords && !regexp && !preserveCase) {
const QPixmap pixmap = Utils::ThemeHelper::recoloredPixmap(
QLatin1String(Constants::ICON_MAGNIFIER),
Utils::ThemeHelper::inputfieldIconColor());
const QPixmap pixmap = Icons::MAGNIFIER.pixmap();
m_ui.findEdit->setButtonPixmap(Utils::FancyLineEdit::Left, pixmap);
} else {
m_ui.findEdit->setButtonPixmap(Utils::FancyLineEdit::Left,
@@ -970,13 +967,13 @@ void FindToolBar::setLightColoredIcon(bool lightColored)
m_ui.findNextButton->setArrowType(Qt::RightArrow);
m_ui.findPreviousButton->setIcon(QIcon());
m_ui.findPreviousButton->setArrowType(Qt::LeftArrow);
m_ui.close->setIcon(QIcon(QLatin1String(Constants::ICON_DARK_CLOSE)));
m_ui.close->setIcon(Icons::DARK_CLOSE.icon());
} else {
m_ui.findNextButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_NEXT)));
m_ui.findNextButton->setIcon(Icons::NEXT.icon());
m_ui.findNextButton->setArrowType(Qt::NoArrow);
m_ui.findPreviousButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_PREV)));
m_ui.findPreviousButton->setIcon(Icons::PREV.icon());
m_ui.findPreviousButton->setArrowType(Qt::NoArrow);
m_ui.close->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_BUTTON_CLOSE)));
m_ui.close->setIcon(Icons::BUTTON_CLOSE.icon());
}
}
+6 -4
View File
@@ -30,6 +30,8 @@
#include "ifindfilter.h"
#include <coreplugin/coreicons.h>
#include <QPainter>
#include <QPixmap>
@@ -228,10 +230,10 @@ FindFlags IFindFilter::supportedFindFlags() const
QPixmap IFindFilter::pixmapForFindFlags(FindFlags flags)
{
static const QPixmap casesensitiveIcon = QPixmap(QLatin1String(":/find/images/casesensitively.png"));
static const QPixmap regexpIcon = QPixmap(QLatin1String(":/find/images/regexp.png"));
static const QPixmap wholewordsIcon = QPixmap(QLatin1String(":/find/images/wholewords.png"));
static const QPixmap preservecaseIcon = QPixmap(QLatin1String(":/find/images/preservecase.png"));
static const QPixmap casesensitiveIcon = Icons::FIND_CASE_INSENSITIVELY.pixmap();
static const QPixmap regexpIcon = Icons::FIND_REGEXP.pixmap();
static const QPixmap wholewordsIcon = Icons::FIND_WHOLE_WORD.pixmap();
static const QPixmap preservecaseIcon = Icons::FIND_PRESERVE_CASE.pixmap();
bool casesensitive = flags & FindCaseSensitively;
bool wholewords = flags & FindWholeWords;
bool regexp = flags & FindRegularExpression;
@@ -35,11 +35,10 @@
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icontext.h>
#include <utils/qtcassert.h>
#include <utils/styledbar.h>
#include <utils/themehelper.h>
#include <QAction>
#include <QComboBox>
@@ -142,7 +141,7 @@ namespace Internal {
m_expandCollapseButton->setAutoRaise(true);
m_expandCollapseAction->setCheckable(true);
m_expandCollapseAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/find/images/expand.png")));
m_expandCollapseAction->setIcon(Core::Icons::EXPAND.icon());
Command *cmd = ActionManager::registerAction(m_expandCollapseAction, "Find.ExpandAll");
cmd->setAttribute(Command::CA_UpdateText);
m_expandCollapseButton->setDefaultAction(cmd->action());
Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 336 B

+2 -2
View File
@@ -30,7 +30,7 @@
#include "infobar.h"
#include "coreconstants.h"
#include "coreicons.h"
#include "icore.h"
#include <utils/theme/theme.h>
@@ -251,7 +251,7 @@ void InfoBarDisplay::update()
if (info.cancelButtonText.isEmpty()) {
infoWidgetCloseButton->setAutoRaise(true);
infoWidgetCloseButton->setIcon(QIcon(QLatin1String(Constants::ICON_CLEAR)));
infoWidgetCloseButton->setIcon(Icons::CLEAR.icon());
infoWidgetCloseButton->setToolTip(tr("Close"));
if (infoWidgetSuppressButton)
hbox->addWidget(infoWidgetSuppressButton);
@@ -32,9 +32,8 @@
#include "locatorfiltersfilter.h"
#include "locatorwidget.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
using namespace Core;
using namespace Core::Internal;
@@ -45,7 +44,7 @@ LocatorFiltersFilter::LocatorFiltersFilter(Locator *plugin,
LocatorWidget *locatorWidget):
m_plugin(plugin),
m_locatorWidget(locatorWidget),
m_icon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_NEXT)))
m_icon(Icons::NEXT.icon())
{
setId("FiltersFilter");
setDisplayName(tr("Available filters"));
@@ -34,7 +34,7 @@
#include "locatorsearchutils.h"
#include "ilocatorfilter.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
@@ -47,7 +47,6 @@
#include <utils/qtcassert.h>
#include <utils/runextensions.h>
#include <utils/stylehelper.h>
#include <utils/themehelper.h>
#include <QColor>
#include <QFileInfo>
@@ -253,9 +252,7 @@ LocatorWidget::LocatorWidget(Locator *qop) :
layout->addWidget(m_fileLineEdit);
setWindowIcon(QIcon(QLatin1String(":/locator/images/locator.png")));
const QPixmap pixmap = Utils::ThemeHelper::recoloredPixmap(
QLatin1String(Constants::ICON_MAGNIFIER),
Utils::ThemeHelper::inputfieldIconColor());
const QPixmap pixmap = Icons::MAGNIFIER.pixmap();
m_fileLineEdit->setFiltering(true);
m_fileLineEdit->setButtonPixmap(Utils::FancyLineEdit::Left, pixmap);
m_fileLineEdit->setButtonToolTip(Utils::FancyLineEdit::Left, tr("Options"));
+11 -12
View File
@@ -30,7 +30,7 @@
#include "mainwindow.h"
#include "icore.h"
#include "coreconstants.h"
#include "coreicons.h"
#include "jsexpander.h"
#include "toolsettings.h"
#include "mimetypesettings.h"
@@ -81,7 +81,6 @@
#include <utils/qtcassert.h>
#include <utils/stylehelper.h>
#include <utils/theme/theme.h>
#include <utils/themehelper.h>
#include <utils/stringutils.h>
#include <QApplication>
@@ -153,7 +152,7 @@ MainWindow::MainWindow() :
setWindowTitle(tr("Qt Creator"));
if (HostOsInfo::isLinuxHost())
QApplication::setWindowIcon(QIcon(QLatin1String(Constants::ICON_QTLOGO_128)));
QApplication::setWindowIcon(Icons::QTLOGO_128.icon());
QCoreApplication::setApplicationName(QLatin1String("QtCreator"));
QCoreApplication::setApplicationVersion(QLatin1String(Constants::IDE_VERSION_LONG));
QCoreApplication::setOrganizationName(QLatin1String(Constants::IDE_SETTINGSVARIANT_STR));
@@ -503,7 +502,7 @@ void MainWindow::registerDefaultActions()
connect(m_focusToEditor, SIGNAL(triggered()), this, SLOT(setFocusToEditor()));
// New File Action
QIcon icon = QIcon::fromTheme(QLatin1String("document-new"), QIcon(QLatin1String(Constants::ICON_NEWFILE)));
QIcon icon = QIcon::fromTheme(QLatin1String("document-new"), Icons::NEWFILE.icon());
m_newAction = new QAction(icon, tr("&New File or Project..."), this);
cmd = ActionManager::registerAction(m_newAction, Constants::NEW);
cmd->setDefaultKeySequence(QKeySequence::New);
@@ -517,7 +516,7 @@ void MainWindow::registerDefaultActions()
});
// Open Action
icon = QIcon::fromTheme(QLatin1String("document-open"), QIcon(QLatin1String(Constants::ICON_OPENFILE)));
icon = QIcon::fromTheme(QLatin1String("document-open"), Icons::OPENFILE.icon());
m_openAction = new QAction(icon, tr("&Open File or Project..."), this);
cmd = ActionManager::registerAction(m_openAction, Constants::OPEN);
cmd->setDefaultKeySequence(QKeySequence::Open);
@@ -537,7 +536,7 @@ void MainWindow::registerDefaultActions()
ac->setOnAllDisabledBehavior(ActionContainer::Show);
// Save Action
icon = QIcon::fromTheme(QLatin1String("document-save"), QIcon(QLatin1String(Constants::ICON_SAVEFILE)));
icon = QIcon::fromTheme(QLatin1String("document-save"), Icons::SAVEFILE.icon());
QAction *tmpaction = new QAction(icon, tr("&Save"), this);
tmpaction->setEnabled(false);
cmd = ActionManager::registerAction(tmpaction, Constants::SAVE);
@@ -581,7 +580,7 @@ void MainWindow::registerDefaultActions()
connect(m_exitAction, SIGNAL(triggered()), this, SLOT(exit()));
// Undo Action
icon = QIcon::fromTheme(QLatin1String("edit-undo"), QIcon(QLatin1String(Constants::ICON_UNDO)));
icon = QIcon::fromTheme(QLatin1String("edit-undo"), Icons::UNDO.icon());
tmpaction = new QAction(icon, tr("&Undo"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::UNDO);
cmd->setDefaultKeySequence(QKeySequence::Undo);
@@ -591,7 +590,7 @@ void MainWindow::registerDefaultActions()
tmpaction->setEnabled(false);
// Redo Action
icon = QIcon::fromTheme(QLatin1String("edit-redo"), QIcon(QLatin1String(Constants::ICON_REDO)));
icon = QIcon::fromTheme(QLatin1String("edit-redo"), Icons::REDO.icon());
tmpaction = new QAction(icon, tr("&Redo"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::REDO);
cmd->setDefaultKeySequence(QKeySequence::Redo);
@@ -601,7 +600,7 @@ void MainWindow::registerDefaultActions()
tmpaction->setEnabled(false);
// Cut Action
icon = QIcon::fromTheme(QLatin1String("edit-cut"), QIcon(QLatin1String(Constants::ICON_CUT)));
icon = QIcon::fromTheme(QLatin1String("edit-cut"), Icons::CUT.icon());
tmpaction = new QAction(icon, tr("Cu&t"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::CUT);
cmd->setDefaultKeySequence(QKeySequence::Cut);
@@ -609,7 +608,7 @@ void MainWindow::registerDefaultActions()
tmpaction->setEnabled(false);
// Copy Action
icon = QIcon::fromTheme(QLatin1String("edit-copy"), QIcon(QLatin1String(Constants::ICON_COPY)));
icon = QIcon::fromTheme(QLatin1String("edit-copy"), Icons::COPY.icon());
tmpaction = new QAction(icon, tr("&Copy"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::COPY);
cmd->setDefaultKeySequence(QKeySequence::Copy);
@@ -617,7 +616,7 @@ void MainWindow::registerDefaultActions()
tmpaction->setEnabled(false);
// Paste Action
icon = QIcon::fromTheme(QLatin1String("edit-paste"), QIcon(QLatin1String(Constants::ICON_PASTE)));
icon = QIcon::fromTheme(QLatin1String("edit-paste"), Icons::PASTE.icon());
tmpaction = new QAction(icon, tr("&Paste"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::PASTE);
cmd->setDefaultKeySequence(QKeySequence::Paste);
@@ -691,7 +690,7 @@ void MainWindow::registerDefaultActions()
}
// Show Sidebar Action
m_toggleSideBarAction = new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_TOGGLE_SIDEBAR)),
m_toggleSideBarAction = new QAction(Icons::TOGGLE_SIDEBAR.icon(),
QCoreApplication::translate("Core", Constants::TR_SHOW_SIDEBAR),
this);
m_toggleSideBarAction->setCheckable(true);
+3 -4
View File
@@ -32,7 +32,7 @@
#include "styleanimator.h"
#include <coreplugin/coreconstants.h>
#include "coreicons.h"
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
@@ -40,7 +40,6 @@
#include <utils/fancymainwindow.h>
#include <utils/theme/theme.h>
#include <utils/themehelper.h>
#include <QApplication>
#include <QComboBox>
@@ -139,8 +138,8 @@ public:
ManhattanStylePrivate::ManhattanStylePrivate() :
lineeditImage(StyleHelper::dpiSpecificImageFile(QStringLiteral(":/core/images/inputfield.png"))),
lineeditImage_disabled(StyleHelper::dpiSpecificImageFile(QStringLiteral(":/core/images/inputfield_disabled.png"))),
extButtonPixmap(ThemeHelper::themedIconPixmap(QLatin1String(":/core/images/extension.png"))),
closeButtonPixmap(QLatin1String(Core::Constants::ICON_CLOSE_BUTTON))
extButtonPixmap(Core::Icons::TOOLBAR_EXTENSION.pixmap()),
closeButtonPixmap(Core::Icons::CLOSE_BUTTON.pixmap())
{
}
@@ -31,13 +31,12 @@
#include "navigationsubwidget.h"
#include "navigationwidget.h"
#include "coreconstants.h"
#include "coreicons.h"
#include "inavigationwidgetfactory.h"
#include "actionmanager/command.h"
#include "id.h"
#include <utils/styledbar.h>
#include <utils/themehelper.h>
#include <QDebug>
@@ -75,8 +74,7 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget, int pos
toolBarLayout->addWidget(m_navigationComboBox);
QToolButton *splitAction = new QToolButton();
splitAction->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)));
splitAction->setIcon(Icons::SPLIT_HORIZONTAL.icon());
splitAction->setToolTip(tr("Split"));
splitAction->setPopupMode(QToolButton::InstantPopup);
splitAction->setProperty("noArrow", true);
@@ -85,8 +83,7 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget, int pos
connect(m_splitMenu, &QMenu::aboutToShow, this, &NavigationSubWidget::populateSplitMenu);
m_closeButton = new QToolButton();
m_closeButton->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
m_closeButton->setIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
m_closeButton->setToolTip(tr("Close"));
toolBarLayout->addWidget(splitAction);
+8 -16
View File
@@ -32,7 +32,7 @@
#include "navigationsubwidget.h"
#include "icontext.h"
#include "icore.h"
#include "coreconstants.h"
#include "coreicons.h"
#include "inavigationwidgetfactory.h"
#include "modemanager.h"
#include "actionmanager/actionmanager.h"
@@ -40,8 +40,6 @@
#include "id.h"
#include "imode.h"
#include <utils/themehelper.h>
#include <QCoreApplication>
#include <QDebug>
#include <QSettings>
@@ -250,8 +248,7 @@ Internal::NavigationSubWidget *NavigationWidget::insertSubItem(int position,int
}
if (!d->m_subWidgets.isEmpty()) // Make all icons the bottom icon
d->m_subWidgets.at(0)->setCloseIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
d->m_subWidgets.at(0)->setCloseIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
Internal::NavigationSubWidget *nsw = new Internal::NavigationSubWidget(this, position, index);
connect(nsw, &Internal::NavigationSubWidget::splitMe,
@@ -259,12 +256,9 @@ Internal::NavigationSubWidget *NavigationWidget::insertSubItem(int position,int
connect(nsw, SIGNAL(closeMe()), this, SLOT(closeSubWidget()));
insertWidget(position, nsw);
d->m_subWidgets.insert(position, nsw);
if (d->m_subWidgets.size() == 1)
d->m_subWidgets.at(0)->setCloseIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
else
d->m_subWidgets.at(0)->setCloseIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
d->m_subWidgets.at(0)->setCloseIcon(d->m_subWidgets.size() == 1
? Icons::CLOSE_SPLIT_LEFT.icon()
: Icons::CLOSE_SPLIT_TOP.icon());
return nsw;
}
@@ -313,11 +307,9 @@ void NavigationWidget::closeSubWidget()
subWidget->deleteLater();
// update close button of top item
if (d->m_subWidgets.size() == 1)
d->m_subWidgets.at(0)->setCloseIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
else
d->m_subWidgets.at(0)->setCloseIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
d->m_subWidgets.at(0)->setCloseIcon(d->m_subWidgets.size() == 1
? Icons::CLOSE_SPLIT_LEFT.icon()
: Icons::CLOSE_SPLIT_TOP.icon());
} else {
setShown(false);
}
@@ -30,7 +30,7 @@
#include "opendocumentstreeview.h"
#include "coreconstants.h"
#include "coreicons.h"
#include <QApplication>
#include <QHeaderView>
@@ -87,8 +87,9 @@ void OpenDocumentsDelegate::paint(QPainter *painter, const QStyleOptionViewItem
QStyledItemDelegate::paint(painter, option, index);
if (closeButtonVisible && index.column() == 1 && option.state & QStyle::State_MouseOver) {
const QIcon icon(QLatin1String((option.state & QStyle::State_Selected) ?
Constants::ICON_CLOSE_BUTTON : Constants::ICON_DARK_CLOSE_BUTTON));
const QIcon icon = (option.state & QStyle::State_Selected) ?
Icons::CLOSE_BUTTON.icon()
: Icons::DARK_CLOSE_BUTTON.icon();
QRect iconRect(option.rect.right() - option.rect.height(),
option.rect.top(),
+7 -9
View File
@@ -30,7 +30,7 @@
#include "outputpanemanager.h"
#include "outputpane.h"
#include "coreconstants.h"
#include "coreicons.h"
#include "findplaceholder.h"
#include "icore.h"
@@ -51,7 +51,6 @@
#include <utils/stylehelper.h>
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
#include <utils/themehelper.h>
#include <QDebug>
@@ -124,8 +123,8 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
m_prevAction(0),
m_outputWidgetPane(new QStackedWidget),
m_opToolBarWidgets(new QStackedWidget),
m_minimizeIcon(ThemeHelper::themedIcon(QLatin1String(":/core/images/arrowdown.png"))),
m_maximizeIcon(ThemeHelper::themedIcon(QLatin1String(":/core/images/arrowup.png"))),
m_minimizeIcon(Icons::ARROW_DOWN.icon()),
m_maximizeIcon(Icons::ARROW_UP.icon()),
m_maximised(false),
m_outputPaneHeight(0)
{
@@ -134,17 +133,17 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
m_titleLabel->setContentsMargins(5, 0, 5, 0);
m_clearAction = new QAction(this);
m_clearAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLEAN_PANE)));
m_clearAction->setIcon(Icons::CLEAN_PANE.icon());
m_clearAction->setText(tr("Clear"));
connect(m_clearAction, SIGNAL(triggered()), this, SLOT(clearPage()));
m_nextAction = new QAction(this);
m_nextAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_NEXT)));
m_nextAction->setIcon(Icons::NEXT.icon());
m_nextAction->setText(tr("Next Item"));
connect(m_nextAction, SIGNAL(triggered()), this, SLOT(slotNext()));
m_prevAction = new QAction(this);
m_prevAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_PREV)));
m_prevAction->setIcon(Icons::PREV.icon());
m_prevAction->setText(tr("Previous Item"));
connect(m_prevAction, SIGNAL(triggered()), this, SLOT(slotPrev()));
@@ -152,8 +151,7 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
m_minMaxAction->setIcon(m_maximizeIcon);
m_minMaxAction->setText(tr("Maximize Output Pane"));
m_closeButton->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
m_closeButton->setIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
connect(m_closeButton, SIGNAL(clicked()), this, SLOT(slotHide()));
connect(ICore::instance(), SIGNAL(saveSettingsRequested()), this, SLOT(saveSettings()));
+8 -14
View File
@@ -30,12 +30,11 @@
#include "sidebar.h"
#include "sidebarwidget.h"
#include "coreconstants.h"
#include "coreicons.h"
#include "actionmanager/command.h"
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include <QSettings>
#include <QPointer>
@@ -205,8 +204,7 @@ SideBarItem *SideBar::item(const QString &id)
Internal::SideBarWidget *SideBar::insertSideBarWidget(int position, const QString &id)
{
if (!d->m_widgets.isEmpty())
d->m_widgets.at(0)->setCloseIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
d->m_widgets.at(0)->setCloseIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
Internal::SideBarWidget *item = new Internal::SideBarWidget(this, id);
connect(item, SIGNAL(splitMe()), this, SLOT(splitSubWidget()));
@@ -215,11 +213,9 @@ Internal::SideBarWidget *SideBar::insertSideBarWidget(int position, const QStrin
insertWidget(position, item);
d->m_widgets.insert(position, item);
if (d->m_widgets.size() == 1)
d->m_widgets.at(0)->setCloseIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
else
d->m_widgets.at(0)->setCloseIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
d->m_widgets.at(0)->setCloseIcon(d->m_widgets.size() == 1
? Icons::CLOSE_SPLIT_LEFT.icon()
: Icons::CLOSE_SPLIT_TOP.icon());
updateWidgets();
return item;
}
@@ -249,11 +245,9 @@ void SideBar::closeSubWidget()
removeSideBarWidget(widget);
// update close button of top item
if (d->m_widgets.size() == 1)
d->m_widgets.at(0)->setCloseIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
else
d->m_widgets.at(0)->setCloseIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
d->m_widgets.at(0)->setCloseIcon(d->m_widgets.size() == 1
? Icons::CLOSE_SPLIT_LEFT.icon()
: Icons::CLOSE_SPLIT_TOP.icon());
updateWidgets();
} else {
if (d->m_closeWhenEmpty) {
+4 -6
View File
@@ -32,9 +32,9 @@
#include "sidebar.h"
#include "navigationsubwidget.h"
#include <coreplugin/coreconstants.h>
#include "coreicons.h"
#include <utils/algorithm.h>
#include <utils/themehelper.h>
#include <QToolBar>
#include <QToolButton>
@@ -77,15 +77,13 @@ SideBarWidget::SideBarWidget(SideBar *sideBar, const QString &id)
m_splitAction = new QAction(tr("Split"), m_toolbar);
m_splitAction->setToolTip(tr("Split"));
m_splitAction->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)));
m_splitAction->setIcon(Icons::SPLIT_HORIZONTAL.icon());
connect(m_splitAction, SIGNAL(triggered()), this, SIGNAL(splitMe()));
m_toolbar->addAction(m_splitAction);
m_closeAction = new QAction(tr("Close"), m_toolbar);
m_closeAction->setToolTip(tr("Close"));
m_closeAction->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
m_closeAction->setIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
connect(m_closeAction, SIGNAL(triggered()), this, SIGNAL(closeMe()));
m_toolbar->addAction(m_closeAction);
+3 -3
View File
@@ -31,7 +31,7 @@
#include "versiondialog.h"
#include <app/app_version.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
@@ -52,7 +52,7 @@ VersionDialog::VersionDialog(QWidget *parent)
// We need to set the window icon explicitly here since for some reason the
// application icon isn't used when the size of the dialog is fixed (at least not on X11/GNOME)
if (Utils::HostOsInfo::isLinuxHost())
setWindowIcon(QIcon(QLatin1String(Constants::ICON_QTLOGO_128)));
setWindowIcon(Icons::QTLOGO_128.icon());
setWindowTitle(tr("About Qt Creator"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
@@ -106,7 +106,7 @@ VersionDialog::VersionDialog(QWidget *parent)
connect(buttonBox , SIGNAL(rejected()), this, SLOT(reject()));
QLabel *logoLabel = new QLabel;
logoLabel->setPixmap(QPixmap(QLatin1String(Constants::ICON_QTLOGO_128)));
logoLabel->setPixmap(Icons::QTLOGO_128.pixmap());
layout->addWidget(logoLabel , 0, 0, 1, 1);
layout->addWidget(copyRightLabel, 0, 1, 4, 4);
layout->addWidget(buttonBox, 4, 0, 1, 5);
@@ -31,7 +31,7 @@
#include "cppinsertvirtualmethods.h"
#include "cppquickfixassistant.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <cpptools/cppcodestylesettings.h>
#include <cpptools/cpptoolsreuse.h>
@@ -44,7 +44,6 @@
#include <cplusplus/Overview.h>
#include <utils/changeset.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include <QAction>
#include <QCheckBox>
@@ -1029,7 +1028,7 @@ void InsertVirtualMethodsDialog::initGui()
m_overrideReplacementComboBox, &QComboBox::setEnabled);
QAction *clearUserAddedReplacements = new QAction(this);
clearUserAddedReplacements->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_CLEAN_PANE)));
clearUserAddedReplacements->setIcon(Core::Icons::CLEAN_PANE.icon());
clearUserAddedReplacements->setText(tr("Clear Added \"override\" Equivalents"));
connect(clearUserAddedReplacements, &QAction::triggered, [this]() {
m_availableOverrideReplacements = defaultOverrideReplacements();
+9 -8
View File
@@ -33,6 +33,7 @@
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggericons.h"
#include "debuggerinternalconstants.h"
#include "debuggerstringutils.h"
#include "simplifytype.h"
@@ -265,39 +266,39 @@ BreakHandler::BreakHandler()
QIcon BreakHandler::breakpointIcon()
{
static QIcon icon(_(":/debugger/images/breakpoint_16.png"));
static QIcon icon = Icons::BREAKPOINT.icon();
return icon;
}
QIcon BreakHandler::disabledBreakpointIcon()
{
static QIcon icon(_(":/debugger/images/breakpoint_disabled_16.png"));
static QIcon icon = Icons::BREAKPOINT_DISABLED.icon();
return icon;
}
QIcon BreakHandler::pendingBreakpointIcon()
{
static QIcon icon(_(":/debugger/images/breakpoint_pending_16.png"));
static QIcon icon = Icons::BREAKPOINT_PENDING.icon();
return icon;
}
QIcon BreakHandler::watchpointIcon()
{
static QIcon icon(_(":/debugger/images/watchpoint.png"));
static QIcon icon = Icons::WATCHPOINT.icon();
return icon;
}
QIcon BreakHandler::tracepointIcon()
{
static QIcon icon(_(":/debugger/images/tracepoint.png"));
static QIcon icon = Icons::TRACEPOINT.icon();
return icon;
}
QIcon BreakHandler::emptyIcon()
{
static QIcon icon(_(":/debugger/images/breakpoint_pending_16.png"));
//static QIcon icon(_(":/debugger/images/watchpoint.png"));
//static QIcon icon(_(":/debugger/images/debugger_empty_14.png"));
static QIcon icon = Icons::BREAKPOINT_PENDING.icon();
//static QIcon icon = Icons::WATCHPOINT.icon();
//static QIcon icon = Icons::EMPTY.icon();
return icon;
}
+2 -1
View File
@@ -33,6 +33,7 @@
#include "debuggerengine.h"
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggericons.h"
#include <coreplugin/mainwindow.h>
#include <utils/checkablemessagebox.h>
@@ -683,7 +684,7 @@ MultiBreakPointsDialog::MultiBreakPointsDialog(QWidget *parent) :
BreakTreeView::BreakTreeView()
{
setWindowIcon(QIcon(QLatin1String(":/debugger/images/debugger_breakpoints.png")));
setWindowIcon(Icons::BREAKPOINTS.icon());
setSelectionMode(QAbstractItemView::ExtendedSelection);
connect(action(UseAddressInBreakpointsView), &QAction::toggled,
this, &BreakTreeView::showAddressColumn);
+2 -1
View File
@@ -69,7 +69,8 @@ HEADERS += \
localsandexpressionswindow.h \
imageviewer.h \
simplifytype.h \
unstartedappwatcherdialog.h
unstartedappwatcherdialog.h \
debuggericons.h
SOURCES += \
breakhandler.cpp \
+1
View File
@@ -35,6 +35,7 @@ QtcPlugin {
"debugger_global.h",
"debuggeractions.cpp", "debuggeractions.h",
"debuggerconstants.h",
"debuggericons.h",
"debuggercore.h",
"debuggerdialogs.cpp", "debuggerdialogs.h",
"debuggerengine.cpp", "debuggerengine.h",
+2 -3
View File
@@ -29,6 +29,7 @@
****************************************************************************/
#include "debuggeractions.h"
#include "debuggericons.h"
#ifdef Q_OS_WIN
#include "registerpostmortemaction.h"
@@ -38,7 +39,6 @@
#include <coreplugin/icore.h>
#include <utils/savedaction.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include <QDebug>
#include <QSettings>
@@ -177,8 +177,7 @@ DebuggerSettings::DebuggerSettings()
item->setText(tr("Operate by Instruction"));
item->setCheckable(true);
item->setDefaultValue(false);
item->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(":/debugger/images/debugger_singleinstructionmode.png")));
item->setIcon(Debugger::Icons::SINGLE_INSTRUCTION_MODE.icon());
item->setToolTip(tr("<p>This switches the debugger to instruction-wise "
"operation mode. In this mode, stepping operates on single "
"instructions and the source location view also shows the "
+86
View File
@@ -0,0 +1,86 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef DEBUGGERICONS_H
#define DEBUGGERICONS_H
#include <utils/icon.h>
namespace Debugger {
namespace Icons {
const Utils::Icon BREAKPOINT(
QLatin1String(":/debugger/images/breakpoint_16.png"));
const Utils::Icon BREAKPOINT_DISABLED(
QLatin1String(":/debugger/images/breakpoint_disabled_16.png"));
const Utils::Icon BREAKPOINT_PENDING(
QLatin1String(":/debugger/images/breakpoint_pending_16.png"));
const Utils::Icon BREAKPOINTS(
QLatin1String(":/debugger/images/debugger_breakpoints.png"));
const Utils::Icon WATCHPOINT(
QLatin1String(":/debugger/images/watchpoint.png"));
const Utils::Icon TRACEPOINT(
QLatin1String(":/debugger/images/tracepoint.png"));
const Utils::Icon CONTINUE(
QLatin1String(":/debugger/images/debugger_continue.png"));
const Utils::Icon INTERRUPT(
QLatin1String(":/debugger/images/debugger_interrupt.png"));
const Utils::Icon LOCATION(
QLatin1String(":/debugger/images/location_16.png"));
const Utils::Icon SNAPSHOT(
QLatin1String(":/debugger/images/debugger_snapshot_small.png"));
const Utils::Icon REVERSE_MODE(
QLatin1String(":/debugger/images/debugger_reversemode_16.png"));
const Utils::Icon APPLY_ON_SAVE(
QLatin1String(":/debugger/images/qml/apply-on-save.png"));
const Utils::Icon APP_ON_TOP(
QLatin1String(":/debugger/images/qml/app-on-top.png"));
const Utils::Icon SELECT(
QLatin1String(":/debugger/images/qml/select.png"));
const Utils::Icon EMPTY(
QLatin1String(":/debugger/images/debugger_empty_14.png"));
const Utils::Icon STEP_OVER({
{QLatin1String(":/debugger/images/debugger_stepover_small.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon STEP_OVER_TOOLBUTTON({
{QLatin1String(":/debugger/images/debugger_stepover_small.png"), Utils::Theme::TextColorNormal}}, Utils::Icon::Style::Tinted);
const Utils::Icon STEP_INTO({
{QLatin1String(":/debugger/images/debugger_stepinto_small.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon STEP_OUT({
{QLatin1String(":/debugger/images/debugger_stepout_small.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon RESTART({
{QLatin1String(":/debugger/images/debugger_restart_small.png"), Utils::Theme::IconsRunColor}});
const Utils::Icon SINGLE_INSTRUCTION_MODE({
{QLatin1String(":/debugger/images/debugger_singleinstructionmode.png"), Utils::Theme::IconsBaseColor}});
} // namespace Icons
} // namespace Debugger
#endif // DEBUGGERICONS_H
+2 -2
View File
@@ -32,7 +32,7 @@
#include "debuggeritemmanager.h"
#include "debuggeritem.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -70,7 +70,7 @@ public:
QVariant data(int column, int role) const
{
static QIcon errorIcon(QString::fromLatin1(Core::Constants::ICON_ERROR));
static const QIcon errorIcon = Core::Icons::ERROR.icon();
switch (role) {
case Qt::DisplayRole:
+22 -22
View File
@@ -37,6 +37,7 @@
#include "debuggerkitconfigwidget.h"
#include "debuggerdialogs.h"
#include "debuggerengine.h"
#include "debuggericons.h"
#include "debuggeritemmanager.h"
#include "debuggermainwindow.h"
#include "debuggerrunconfigurationaspect.h"
@@ -77,7 +78,7 @@
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/find/itemviewfind.h>
#include <coreplugin/imode.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/messagebox.h>
#include <coreplugin/messagemanager.h>
@@ -97,6 +98,7 @@
#include <projectexplorer/devicesupport/deviceprocesslist.h>
#include <projectexplorer/devicesupport/deviceprocessesdialog.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/projecttree.h>
#include <projectexplorer/projectexplorersettings.h>
#include <projectexplorer/project.h>
@@ -116,7 +118,6 @@
#include <utils/savedaction.h>
#include <utils/statuslabel.h>
#include <utils/styledbar.h>
#include <utils/themehelper.h>
#include <utils/winutils.h>
#include <QApplication>
@@ -2346,14 +2347,14 @@ void DebuggerPluginPrivate::extensionsInitialized()
const Context cppDebuggercontext(C_CPPDEBUGGER);
const Context cppeditorcontext(CppEditor::Constants::CPPEDITOR_ID);
m_startIcon = ThemeHelper::themedIcon(_(Core::Constants::ICON_DEBUG_START_SMALL));
m_exitIcon = ThemeHelper::themedIcon(_(Core::Constants::ICON_DEBUG_EXIT_SMALL));
m_continueIcon = ThemeHelper::themedIcon(_(Core::Constants::ICON_DEBUG_CONTINUE_SMALL));
m_continueIcon.addFile(_(":/debugger/images/debugger_continue.png"));
m_interruptIcon = ThemeHelper::themedIcon(_(Core::Constants::ICON_DEBUG_INTERRUPT_SMALL));
m_interruptIcon.addFile(_(":/debugger/images/debugger_interrupt.png"));
m_locationMarkIcon = QIcon(_(":/debugger/images/location_16.png"));
m_resetIcon = ThemeHelper::themedIcon(_(":/debugger/images/debugger_restart_small.png|IconsRunColor"));
m_startIcon = Core::Icons::DEBUG_START_SMALL.icon();
m_exitIcon = Core::Icons::DEBUG_EXIT_SMALL.icon();
m_continueIcon = Core::Icons::DEBUG_CONTINUE_SMALL.icon();
m_continueIcon.addPixmap(Icons::CONTINUE.pixmap());
m_interruptIcon = Core::Icons::DEBUG_INTERRUPT_SMALL.icon();
m_interruptIcon.addPixmap(Icons::INTERRUPT.pixmap());
m_locationMarkIcon = Icons::LOCATION.icon();
m_resetIcon = Icons::RESTART.icon();
m_busy = false;
@@ -2443,15 +2444,15 @@ void DebuggerPluginPrivate::extensionsInitialized()
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleReset);
act = m_nextAction = new QAction(tr("Step Over"), this);
act->setIcon(ThemeHelper::themedIcon(_(":/debugger/images/debugger_stepover_small.png")));
act->setIcon(Icons::STEP_OVER.icon());
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecNext);
act = m_stepAction = new QAction(tr("Step Into"), this);
act->setIcon(ThemeHelper::themedIcon(_(":/debugger/images/debugger_stepinto_small.png")));
act->setIcon(Icons::STEP_INTO.icon());
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecStep);
act = m_stepOutAction = new QAction(tr("Step Out"), this);
act->setIcon(ThemeHelper::themedIcon(_(":/debugger/images/debugger_stepout_small.png")));
act->setIcon(Icons::STEP_OUT.icon());
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecStepOut);
act = m_runToLineAction = new QAction(tr("Run to Line"), this);
@@ -2478,14 +2479,13 @@ void DebuggerPluginPrivate::extensionsInitialized()
//m_snapshotAction = new QAction(tr("Create Snapshot"), this);
//m_snapshotAction->setProperty(Role, RequestCreateSnapshotRole);
//m_snapshotAction->setIcon(
// QIcon(__(":/debugger/images/debugger_snapshot_small.png")));
//m_snapshotAction->setIcon(Icons::SNAPSHOT.icon());
act = m_reverseDirectionAction = new QAction(tr("Reverse Direction"), this);
act->setCheckable(true);
act->setChecked(false);
act->setCheckable(false);
act->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_reversemode_16.png")));
act->setIcon(Icons::REVERSE_MODE.icon());
act->setIconVisibleInMenu(false);
act = m_frameDownAction = new QAction(tr("Move to Called Frame"), this);
@@ -2536,8 +2536,8 @@ void DebuggerPluginPrivate::extensionsInitialized()
// The main "Start Debugging" action.
act = m_startAction = new QAction(this);
QIcon debuggerIcon(ThemeHelper::themedIcon(_(Core::Constants::ICON_DEBUG_START_SMALL)));
debuggerIcon.addFile(QLatin1String(":/projectexplorer/images/debugger_start.png"));
QIcon debuggerIcon(Core::Icons::DEBUG_START_SMALL.icon());
debuggerIcon.addPixmap(ProjectExplorer::Icons::DEBUG_START.pixmap());
act->setIcon(debuggerIcon);
act->setText(tr("Start Debugging"));
connect(act, &QAction::triggered, [] { ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DEBUG_RUN_MODE); });
@@ -2766,28 +2766,28 @@ void DebuggerPluginPrivate::extensionsInitialized()
// currently broken
// QAction *qmlUpdateOnSaveDummyAction = new QAction(tr("Apply Changes on Save"), this);
// qmlUpdateOnSaveDummyAction->setCheckable(true);
// qmlUpdateOnSaveDummyAction->setIcon(QIcon(_(":/debugger/images/qml/apply-on-save.png")));
// qmlUpdateOnSaveDummyAction->setIcon(Icons::APPLY_ON_SAVE.icon());
// qmlUpdateOnSaveDummyAction->setEnabled(false);
// cmd = ActionManager::registerAction(qmlUpdateOnSaveDummyAction, Constants::QML_UPDATE_ON_SAVE);
// debugMenu->addAction(cmd);
QAction *qmlShowAppOnTopDummyAction = new QAction(tr("Show Application on Top"), this);
qmlShowAppOnTopDummyAction->setCheckable(true);
qmlShowAppOnTopDummyAction->setIcon(QIcon(_(":/debugger/images/qml/app-on-top.png")));
qmlShowAppOnTopDummyAction->setIcon(Icons::APP_ON_TOP.icon());
qmlShowAppOnTopDummyAction->setEnabled(false);
cmd = ActionManager::registerAction(qmlShowAppOnTopDummyAction, Constants::QML_SHOW_APP_ON_TOP);
debugMenu->addAction(cmd);
QAction *qmlSelectDummyAction = new QAction(tr("Select"), this);
qmlSelectDummyAction->setCheckable(true);
qmlSelectDummyAction->setIcon(QIcon(_(":/debugger/images/qml/select.png")));
qmlSelectDummyAction->setIcon(Icons::SELECT.icon());
qmlSelectDummyAction->setEnabled(false);
cmd = ActionManager::registerAction(qmlSelectDummyAction, Constants::QML_SELECTTOOL);
debugMenu->addAction(cmd);
QAction *qmlZoomDummyAction = new QAction(tr("Zoom"), this);
qmlZoomDummyAction->setCheckable(true);
qmlZoomDummyAction->setIcon(ThemeHelper::themedIcon(_(Core::Constants::ICON_ZOOM)));
qmlZoomDummyAction->setIcon(Core::Icons::ZOOM.icon());
qmlZoomDummyAction->setEnabled(false);
cmd = ActionManager::registerAction(qmlZoomDummyAction, Constants::QML_ZOOMTOOL);
debugMenu->addAction(cmd);
+2 -1
View File
@@ -58,6 +58,7 @@
#include <utils/qtcprocess.h>
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <qmldebug/qmldebugcommandlinearguments.h>
#include <qtsupport/qtkitinformation.h>
@@ -114,7 +115,7 @@ DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfig, DebuggerEngi
m_engine(engine),
m_running(false)
{
setIcon(QLatin1String(Core::Constants::ICON_DEBUG_START_SMALL));
setIcon(Core::Icons::DEBUG_START_SMALL);
connect(this, &RunControl::finished, this, &DebuggerRunControl::handleFinished);
connect(engine, &DebuggerEngine::requestRemoteSetup,
@@ -41,6 +41,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/editormanager/editormanager.h>
@@ -511,7 +512,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget()
auto copyButton = new QToolButton;
copyButton->setToolTip(DebuggerToolTipManager::tr("Copy Contents to Clipboard"));
copyButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_COPY)));
copyButton->setIcon(Core::Icons::COPY.icon());
titleLabel = new DraggableLabel(this);
titleLabel->setMinimumWidth(40); // Ensure a draggable area even if text is empty.
+3 -2
View File
@@ -33,6 +33,7 @@
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggericons.h"
#include <QDebug>
#include <QTime>
@@ -379,8 +380,8 @@ LogWindow::LogWindow(QWidget *parent)
m_commandEdit->setHistoryCompleter(QLatin1String("DebuggerInput"));
auto repeatButton = new QToolButton(this);
repeatButton->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_stepover_small.png")));
repeatButton->setIconSize(QSize(12, 12));
repeatButton->setIcon(Icons::STEP_OVER_TOOLBUTTON.icon());
repeatButton->setFixedSize(QSize(18, 18));
repeatButton->setToolTip(tr("Repeat last command for debug reasons."));
auto commandBox = new QHBoxLayout;
+3 -2
View File
@@ -31,6 +31,7 @@
#include "snapshothandler.h"
#include "debuggerinternalconstants.h"
#include "debuggericons.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggerstartparameters.h"
@@ -123,8 +124,8 @@ QDebug operator<<(QDebug d, const SnapshotData &f)
*/
SnapshotHandler::SnapshotHandler()
: m_positionIcon(QIcon(QLatin1String(":/debugger/images/location_16.png"))),
m_emptyIcon(QIcon(QLatin1String(":/debugger/images/debugger_empty_14.png")))
: m_positionIcon(Icons::LOCATION.icon()),
m_emptyIcon(Icons::EMPTY.icon())
{
m_currentIndex = -1;
}
+3 -2
View File
@@ -32,6 +32,7 @@
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggericons.h"
#include "debuggerengine.h"
#include "debuggerprotocol.h"
#include "simplifytype.h"
@@ -59,8 +60,8 @@ namespace Internal {
StackHandler::StackHandler(DebuggerEngine *engine)
: m_engine(engine),
m_positionIcon(QIcon(QLatin1String(":/debugger/images/location_16.png"))),
m_emptyIcon(QIcon(QLatin1String(":/debugger/images/debugger_empty_14.png")))
m_positionIcon(Icons::LOCATION.icon()),
m_emptyIcon(Icons::EMPTY.icon())
{
setObjectName(QLatin1String("StackModel"));
m_resetLocationScheduled = false;
+3 -2
View File
@@ -31,6 +31,7 @@
#include "threadshandler.h"
#include "debuggercore.h"
#include "debuggericons.h"
#include "debuggerprotocol.h"
#include "watchutils.h"
@@ -54,13 +55,13 @@ namespace Internal {
static const QIcon &positionIcon()
{
static QIcon icon(QLatin1String(":/debugger/images/location_16.png"));
static QIcon icon = Icons::LOCATION.icon();
return icon;
}
static const QIcon &emptyIcon()
{
static QIcon icon(QLatin1String(":/debugger/images/debugger_empty_14.png"));
static QIcon icon = Icons::EMPTY.icon();
return icon;
}
+5 -7
View File
@@ -30,11 +30,13 @@
#include "diffeditor.h"
#include "diffeditorconstants.h"
#include "diffeditoricons.h"
#include "diffeditordocument.h"
#include "diffview.h"
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/minisplitter.h>
#include <texteditor/texteditor.h>
@@ -45,7 +47,6 @@
#include <utils/algorithm.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include <QAction>
#include <QStackedWidget>
@@ -283,16 +284,13 @@ DiffEditor::DiffEditor()
m_whitespaceButtonAction = m_toolBar->addAction(tr("Ignore Whitespace"));
m_whitespaceButtonAction->setCheckable(true);
m_toggleDescriptionAction = m_toolBar->addAction(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_TOP_BAR)), QString());
m_toggleDescriptionAction = m_toolBar->addAction(Icons::TOP_BAR.icon(), QString());
m_toggleDescriptionAction->setCheckable(true);
m_reloadAction = m_toolBar->addAction(QIcon(QLatin1String(Core::Constants::ICON_RELOAD_GRAY)),
tr("Reload Diff"));
m_reloadAction = m_toolBar->addAction(Core::Icons::RELOAD_GRAY.icon(), tr("Reload Diff"));
m_reloadAction->setToolTip(tr("Reload Diff"));
m_toggleSyncAction = m_toolBar->addAction(
Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_LINK)), QString());
m_toggleSyncAction = m_toolBar->addAction(Core::Icons::LINK.icon(), QString());
m_toggleSyncAction->setCheckable(true);
m_viewSwitcherAction = m_toolBar->addAction(QIcon(), QString());
+2 -1
View File
@@ -13,7 +13,8 @@ HEADERS += diffeditor_global.h \
diffview.h \
selectabletexteditorwidget.h \
sidebysidediffeditorwidget.h \
unifieddiffeditorwidget.h
unifieddiffeditorwidget.h \
diffeditoricons.h
SOURCES += diffeditor.cpp \
diffeditorcontroller.cpp \
+1
View File
@@ -19,6 +19,7 @@ QtcPlugin {
"diffeditor.qrc",
"diffeditor_global.h",
"diffeditorconstants.h",
"diffeditoricons.h",
"diffeditorcontroller.cpp",
"diffeditorcontroller.h",
"diffeditordocument.cpp",
@@ -41,8 +41,6 @@ const char DIFF_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("DiffEditor", "Diff Ed
const char DIFF_EDITOR_MIMETYPE[] = "text/x-patch";
const char G_TOOLS_DIFF[] = "QtCreator.Group.Tools.Options";
const char ICON_TOP_BAR[] = ":/diffeditor/images/topbar.png";
const char EXPAND_BRANCHES[] = "Branches: <Expand>";
} // namespace Constants
+49
View File
@@ -0,0 +1,49 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef DIFFEDITORICONS_H
#define DIFFEDITORICONS_H
#include <utils/icon.h>
namespace DiffEditor {
namespace Icons {
const Utils::Icon TOP_BAR({
{QLatin1String(":/diffeditor/images/topbar.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon UNIFIED_DIFF({
{QLatin1String(":/diffeditor/images/unifieddiff.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon SIDEBYSIDE_DIFF({
{QLatin1String(":/diffeditor/images/sidebysidediff.png"), Utils::Theme::IconsBaseColor}});
} // namespace Icons
} // namespace DiffEditor
#endif // DIFFEDITORICONS_H
+3 -5
View File
@@ -30,11 +30,11 @@
#include "diffview.h"
#include "diffeditoricons.h"
#include "unifieddiffeditorwidget.h"
#include "sidebysidediffeditorwidget.h"
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include <QCoreApplication>
@@ -97,8 +97,7 @@ void IDiffView::setSyncToolTip(const QString &text)
UnifiedView::UnifiedView() : m_widget(0)
{
setId(UNIFIED_VIEW_ID);
setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(":/diffeditor/images/unifieddiff.png")));
setIcon(Icons::UNIFIED_DIFF.icon());
setToolTip(QCoreApplication::translate("DiffEditor::UnifiedView", "Switch to Unified Diff Editor"));
}
@@ -154,8 +153,7 @@ void UnifiedView::setSync(bool sync)
SideBySideView::SideBySideView() : m_widget(0)
{
setId(SIDE_BY_SIDE_VIEW_ID);
setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(":/diffeditor/images/sidebysidediff.png")));
setIcon(Icons::UNIFIED_DIFF.icon());
setToolTip(QCoreApplication::translate("DiffEditor::SideBySideView",
"Switch to Side By Side Diff Editor"));
setSupportsSync(true);
+2 -1
View File
@@ -49,6 +49,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
@@ -721,7 +722,7 @@ class RebaseItemDelegate : public IconItemDelegate
{
public:
RebaseItemDelegate(LogChangeWidget *widget)
: IconItemDelegate(widget, QLatin1String(Core::Constants::ICON_UNDO))
: IconItemDelegate(widget, Core::Icons::UNDO.imageFileName())
{
}
+2 -3
View File
@@ -34,8 +34,8 @@
#include "logchangedialog.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <utils/completingtextedit.h>
#include <utils/themehelper.h>
#include <QRegExpValidator>
#include <QTextEdit>
@@ -61,8 +61,7 @@ GitSubmitEditorWidget::GitSubmitEditorWidget() :
new GitSubmitHighlighter(descriptionEdit());
m_emailValidator = new QRegExpValidator(QRegExp(QLatin1String("[^@ ]+@[^@ ]+\\.[a-zA-Z]+")), this);
const QPixmap error =
Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_ERROR));
const QPixmap error = Core::Icons::ERROR.pixmap();
m_gitSubmitPanelUi.invalidAuthorLabel->setPixmap(error);
m_gitSubmitPanelUi.invalidEmailLabel->setToolTip(tr("Provide a valid email to commit."));
m_gitSubmitPanelUi.invalidEmailLabel->setPixmap(error);
+1
View File
@@ -41,6 +41,7 @@ QtcPlugin {
"generalsettingspage.cpp", "generalsettingspage.h", "generalsettingspage.ui",
"help.qrc",
"helpconstants.h",
"helpicons.h",
"helpfindsupport.cpp", "helpfindsupport.h",
"helpindexfilter.cpp", "helpindexfilter.h",
"helpmode.cpp", "helpmode.h",
+2 -1
View File
@@ -31,6 +31,7 @@
#include "helpindexfilter.h"
#include "centralwidget.h"
#include "helpicons.h"
#include <topicchooser.h>
@@ -58,7 +59,7 @@ HelpIndexFilter::HelpIndexFilter()
setIncludedByDefault(false);
setShortcutString(QString(QLatin1Char('?')));
m_icon = QIcon(QLatin1String(":/help/images/bookmark.png"));
m_icon = Icons::BOOKMARK.icon();
connect(HelpManager::instance(), &HelpManager::setupFinished,
this, &HelpIndexFilter::invalidateCache);
connect(HelpManager::instance(), &HelpManager::documentationChanged,
+8 -12
View File
@@ -33,6 +33,7 @@
#include "bookmarkmanager.h"
#include "contentwindow.h"
#include "helpconstants.h"
#include "helpicons.h"
#include "helpplugin.h"
#include "helpviewer.h"
#include "indexwindow.h"
@@ -45,6 +46,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/findplaceholder.h>
#include <coreplugin/minisplitter.h>
@@ -52,7 +54,6 @@
#include <texteditor/texteditorconstants.h>
#include <utils/qtcassert.h>
#include <utils/styledbar.h>
#include <utils/themehelper.h>
#include <QCoreApplication>
#include <QHBoxLayout>
@@ -132,7 +133,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
setAttribute(Qt::WA_QuitOnClose, false); // don't prevent Qt Creator from closing
}
if (style != SideBarWidget) {
m_toggleSideBarAction = new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_TOGGLE_SIDEBAR)),
m_toggleSideBarAction = new QAction(Core::Icons::TOGGLE_SIDEBAR.icon(),
QCoreApplication::translate("Core", Core::Constants::TR_SHOW_SIDEBAR),
toolBar);
m_toggleSideBarAction->setCheckable(true);
@@ -163,14 +164,12 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
layout->addWidget(Core::Command::toolButtonWithAppendedShortcut(m_switchToHelp, cmd));
}
m_homeAction = new QAction(QIcon(QLatin1String(":/help/images/home.png")),
tr("Home"), this);
m_homeAction = new QAction(Icons::HOME.icon(), tr("Home"), this);
cmd = Core::ActionManager::registerAction(m_homeAction, Constants::HELP_HOME, context);
connect(m_homeAction, &QAction::triggered, this, &HelpWidget::goHome);
layout->addWidget(Core::Command::toolButtonWithAppendedShortcut(m_homeAction, cmd));
m_backAction = new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_PREV)),
tr("Back"), toolBar);
m_backAction = new QAction(Core::Icons::PREV.icon(), tr("Back"), toolBar);
connect(m_backAction, &QAction::triggered, this, &HelpWidget::backward);
m_backMenu = new QMenu(toolBar);
connect(m_backMenu, &QMenu::aboutToShow, this, &HelpWidget::updateBackMenu);
@@ -181,8 +180,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
button->setPopupMode(QToolButton::DelayedPopup);
layout->addWidget(button);
m_forwardAction = new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_NEXT)),
tr("Forward"), toolBar);
m_forwardAction = new QAction(Core::Icons::NEXT.icon(), tr("Forward"), toolBar);
connect(m_forwardAction, &QAction::triggered, this, &HelpWidget::forward);
m_forwardMenu = new QMenu(toolBar);
connect(m_forwardMenu, &QMenu::aboutToShow, this, &HelpWidget::updateForwardMenu);
@@ -193,8 +191,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
button->setPopupMode(QToolButton::DelayedPopup);
layout->addWidget(button);
m_addBookmarkAction = new QAction(QIcon(QLatin1String(":/help/images/bookmark.png")),
tr("Add Bookmark"), this);
m_addBookmarkAction = new QAction(Icons::BOOKMARK.icon(), tr("Add Bookmark"), this);
cmd = Core::ActionManager::registerAction(m_addBookmarkAction, Constants::HELP_ADDBOOKMARK, context);
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M")));
connect(m_addBookmarkAction, &QAction::triggered, this, &HelpWidget::addBookmark);
@@ -253,8 +250,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
}
if (style != ExternalWindow) {
m_closeAction = new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_BUTTON_CLOSE)),
QString(), toolBar);
m_closeAction = new QAction(Core::Icons::BUTTON_CLOSE.icon(), QString(), toolBar);
connect(m_closeAction, SIGNAL(triggered()), this, SIGNAL(closeButtonClicked()));
button = new QToolButton;
button->setDefaultAction(m_closeAction);
+2 -1
View File
@@ -35,6 +35,7 @@
#include "openpagesmanager.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <utils/styledbar.h>
@@ -312,7 +313,7 @@ SearchSideBarItem::SearchSideBarItem()
QList<QToolButton *> SearchSideBarItem::createToolBarWidgets()
{
QToolButton *reindexButton = new QToolButton;
reindexButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_RELOAD_GRAY)));
reindexButton->setIcon(Core::Icons::RELOAD_GRAY.icon());
reindexButton->setToolTip(tr("Regenerate Index"));
connect(reindexButton, SIGNAL(clicked()),
widget(), SLOT(reindexDocumentation()));
+2 -1
View File
@@ -29,6 +29,7 @@
****************************************************************************/
#include "xbelsupport.h"
#include "helpicons.h"
#include <bookmarkmanager.h>
@@ -101,7 +102,7 @@ XbelReader::XbelReader(BookmarkModel *tree, BookmarkModel *list)
, treeModel(tree)
, listModel(list)
{
bookmarkIcon = QIcon(QLatin1String(":/help/images/bookmark.png"));
bookmarkIcon = Icons::BOOKMARK.icon();
folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon);
}
+4 -7
View File
@@ -36,12 +36,12 @@
#include "imageview.h"
#include "ui_imageviewertoolbar.h"
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include <QMap>
#include <QFileInfo>
@@ -106,12 +106,9 @@ void ImageViewer::ctor()
// toolbar
d->toolbar = new QWidget();
d->ui_toolbar.setupUi(d->toolbar);
d->ui_toolbar.toolButtonZoomIn->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Core::Constants::ICON_PLUS)));
d->ui_toolbar.toolButtonZoomOut->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Core::Constants::ICON_MINUS)));
d->ui_toolbar.toolButtonFitToScreen->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Core::Constants::ICON_ZOOM)));
d->ui_toolbar.toolButtonZoomIn->setIcon(Core::Icons::PLUS.icon());
d->ui_toolbar.toolButtonZoomOut->setIcon(Core::Icons::MINUS.icon());
d->ui_toolbar.toolButtonFitToScreen->setIcon(Core::Icons::ZOOM.icon());
// icons update - try to use system theme
updateButtonIconByTheme(d->ui_toolbar.toolButtonZoomIn, QLatin1String("zoom-in"));
+2 -2
View File
@@ -33,7 +33,7 @@
#include "iosrunconfiguration.h"
#include "iosrunner.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <projectexplorer/projectexplorerconstants.h>
using namespace ProjectExplorer;
@@ -46,7 +46,7 @@ IosRunControl::IosRunControl(IosRunConfiguration *rc)
, m_runner(new IosRunner(this, rc, false, QmlDebug::NoQmlDebugServices))
, m_running(false)
{
setIcon(QLatin1String(Core::Constants::ICON_DEBUG_START_SMALL));
setIcon(Core::Icons::DEBUG_START_SMALL);
}
IosRunControl::~IosRunControl()
+10 -13
View File
@@ -30,6 +30,7 @@
#include "appoutputpane.h"
#include "projectexplorer.h"
#include "projectexplorericons.h"
#include "projectexplorersettings.h"
#include "runconfiguration.h"
#include "session.h"
@@ -37,7 +38,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/outputwindow.h>
#include <coreplugin/find/basetextfind.h>
#include <coreplugin/coreconstants.h>
@@ -51,7 +52,6 @@
#include <utils/algorithm.h>
#include <utils/outputformatter.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include <QAction>
#include <QVBoxLayout>
@@ -164,7 +164,7 @@ AppOutputPane::AppOutputPane() :
setObjectName(QLatin1String("AppOutputPane")); // Used in valgrind engine
// Rerun
m_reRunButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_RUN_SMALL)));
m_reRunButton->setIcon(Icons::RUN_SMALL.icon());
m_reRunButton->setToolTip(tr("Re-run this run-configuration"));
m_reRunButton->setAutoRaise(true);
m_reRunButton->setEnabled(false);
@@ -172,7 +172,7 @@ AppOutputPane::AppOutputPane() :
this, SLOT(reRunRunControl()));
// Stop
m_stopAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_STOP_SMALL)));
m_stopAction->setIcon(Icons::STOP_SMALL.icon());
m_stopAction->setToolTip(tr("Stop"));
m_stopAction->setEnabled(false);
@@ -187,24 +187,21 @@ AppOutputPane::AppOutputPane() :
// Attach
m_attachButton->setToolTip(msgAttachDebuggerTooltip());
m_attachButton->setEnabled(false);
m_attachButton->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Core::Constants::ICON_DEBUG_START_SMALL)));
m_attachButton->setIcon(Core::Icons::DEBUG_START_SMALL.icon());
m_attachButton->setAutoRaise(true);
connect(m_attachButton, SIGNAL(clicked()),
this, SLOT(attachToRunControl()));
m_zoomInButton->setToolTip(tr("Increase Font Size"));
m_zoomInButton->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Core::Constants::ICON_PLUS)));
m_zoomInButton->setIcon(Core::Icons::PLUS.icon());
m_zoomInButton->setAutoRaise(true);
connect(m_zoomInButton, &QToolButton::clicked,
this, &AppOutputPane::zoomIn);
m_zoomOutButton->setToolTip(tr("Decrease Font Size"));
m_zoomOutButton->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Core::Constants::ICON_MINUS)));
m_zoomOutButton->setIcon(Core::Icons::MINUS.icon());
m_zoomOutButton->setAutoRaise(true);
connect(m_zoomOutButton, &QToolButton::clicked,
@@ -422,7 +419,7 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc)
Core::Context context(contextId);
Core::OutputWindow *ow = new Core::OutputWindow(context, m_tabWidget);
ow->setWindowTitle(tr("Application Output Window"));
ow->setWindowIcon(QIcon(QLatin1String(Constants::ICON_WINDOW)));
ow->setWindowIcon(Icons::WINDOW.icon());
ow->setFormatter(formatter);
ow->setWordWrapEnabled(ProjectExplorerPlugin::projectExplorerSettings().wrapAppOutput);
ow->setMaxLineCount(ProjectExplorerPlugin::projectExplorerSettings().maxAppOutputLines);
@@ -642,7 +639,7 @@ void AppOutputPane::enableButtons(const RunControl *rc /* = 0 */, bool isRunning
{
if (rc) {
m_reRunButton->setEnabled(!isRunning && rc->supportsReRunning());
m_reRunButton->setIcon(Utils::ThemeHelper::themedIcon(rc->icon()));
m_reRunButton->setIcon(rc->icon().icon());
m_stopAction->setEnabled(isRunning);
if (isRunning && debuggerPlugin() && rc->applicationProcessHandle().isValid()) {
m_attachButton->setEnabled(true);
@@ -655,7 +652,7 @@ void AppOutputPane::enableButtons(const RunControl *rc /* = 0 */, bool isRunning
m_zoomOutButton->setEnabled(true);
} else {
m_reRunButton->setEnabled(false);
m_reRunButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_RUN_SMALL)));
m_reRunButton->setIcon(Icons::RUN_SMALL.icon());
m_attachButton->setEnabled(false);
m_attachButton->setToolTip(msgAttachDebuggerTooltip());
m_stopAction->setEnabled(false);
@@ -31,9 +31,8 @@
#include "buildprogress.h"
#include "projectexplorerconstants.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <utils/stylehelper.h>
#include <utils/themehelper.h>
#include <QVBoxLayout>
#include <QHBoxLayout>
@@ -88,10 +87,8 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation
m_errorIcon->setAlignment(Qt::AlignRight);
m_warningIcon->setAlignment(Qt::AlignRight);
m_errorIcon->setPixmap(Utils::ThemeHelper::themedIconPixmap(
QLatin1String(Core::Constants::ICON_ERROR)));
m_warningIcon->setPixmap(Utils::ThemeHelper::themedIconPixmap(
QLatin1String(Core::Constants::ICON_WARNING)));
m_errorIcon->setPixmap(Core::Icons::ERROR.pixmap());
m_warningIcon->setPixmap(Core::Icons::WARNING.pixmap());
m_contentWidget->hide();
@@ -35,7 +35,7 @@
#include "projectexplorerconstants.h"
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h>
#include <utils/detailswidget.h>
@@ -109,7 +109,7 @@ ToolWidget::ToolWidget(QWidget *parent)
m_removeButton->setToolTip(BuildStepListWidget::tr("Remove Item"));
m_removeButton->setFixedSize(buttonSize);
m_removeButton->setIcon(QIcon(creatorTheme()->imageFile(Theme::BuildStepRemove,
QLatin1String(Core::Constants::ICON_DARK_CLOSE))));
Core::Icons::DARK_CLOSE.imageFileName())));
hbox->addWidget(m_removeButton);
layout->addWidget(m_secondWidget);
@@ -33,20 +33,20 @@
#include "showoutputtaskhandler.h"
#include "task.h"
#include "projectexplorer.h"
#include "projectexplorericons.h"
#include "projectexplorersettings.h"
#include "taskhub.h"
#include <coreplugin/outputwindow.h>
#include <coreplugin/find/basetextfind.h>
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <extensionsystem/pluginmanager.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h>
#include <texteditor/behaviorsettings.h>
#include <utils/ansiescapecodehandler.h>
#include <utils/theme/theme.h>
#include <utils/themehelper.h>
#include <QIcon>
#include <QTextCharFormat>
@@ -156,7 +156,7 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
Core::Context context(Constants::C_COMPILE_OUTPUT);
m_outputWindow = new CompileOutputTextEdit(context);
m_outputWindow->setWindowTitle(tr("Compile Output"));
m_outputWindow->setWindowIcon(QIcon(QLatin1String(Constants::ICON_WINDOW)));
m_outputWindow->setWindowIcon(Icons::WINDOW.icon());
m_outputWindow->setReadOnly(true);
m_outputWindow->setUndoRedoEnabled(false);
m_outputWindow->setMaxLineCount(MAX_LINECOUNT);
@@ -172,11 +172,9 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
m_cancelBuildButton->setDefaultAction(cancelBuildAction);
m_zoomInButton->setToolTip(tr("Increase Font Size"));
m_zoomInButton->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Core::Constants::ICON_PLUS)));
m_zoomInButton->setIcon(Core::Icons::PLUS.icon());
m_zoomOutButton->setToolTip(tr("Decrease Font Size"));
m_zoomOutButton->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Core::Constants::ICON_MINUS)));
m_zoomOutButton->setIcon(Core::Icons::MINUS.icon());
updateZoomEnabled();
@@ -32,10 +32,9 @@
#include "ui_desktopdeviceconfigurationwidget.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <utils/portlist.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
using namespace ProjectExplorer::Constants;
@@ -75,8 +74,7 @@ void DesktopDeviceConfigurationWidget::initGui()
m_ui->machineTypeValueLabel->setText(tr("Physical Device"));
m_ui->freePortsLineEdit->setPlaceholderText(
QString::fromLatin1("eg: %1-%2").arg(DESKTOP_PORT_START).arg(DESKTOP_PORT_END));
m_ui->portsWarningLabel->setPixmap(
Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
m_ui->portsWarningLabel->setPixmap(Core::Icons::WARNING.pixmap());
m_ui->portsWarningLabel->setToolTip(QLatin1String("<font color=\"red\">")
+ tr("You will need at least one port for QML debugging.")
+ QLatin1String("</font>"));
@@ -39,7 +39,7 @@
#include <coreplugin/fileiconprovider.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/fileutils.h>
#include <coreplugin/find/findplugin.h>
@@ -50,7 +50,6 @@
#include <utils/qtcassert.h>
#include <utils/elidinglabel.h>
#include <utils/itemviews.h>
#include <utils/themehelper.h>
#include <QDebug>
#include <QSize>
@@ -168,8 +167,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent)
layout->setContentsMargins(0, 0, 0, 0);
setLayout(layout);
m_toggleSync->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_LINK)));
m_toggleSync->setIcon(Core::Icons::LINK.icon());
m_toggleSync->setCheckable(true);
m_toggleSync->setToolTip(tr("Synchronize with Editor"));
setAutoSynchronization(true);
@@ -448,7 +446,7 @@ Core::NavigationView FolderNavigationWidgetFactory::createWidget()
FolderNavigationWidget *fnw = new FolderNavigationWidget;
n.widget = fnw;
QToolButton *filter = new QToolButton;
filter->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
filter->setIcon(Core::Icons::FILTER.icon());
filter->setToolTip(tr("Filter Files"));
filter->setPopupMode(QToolButton::InstantPopup);
filter->setProperty("noArrow", true);
+3 -6
View File
@@ -34,10 +34,9 @@
#include "kitmanagerconfigwidget.h"
#include "kitmanager.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include <QApplication>
#include <QLayout>
@@ -85,13 +84,11 @@ public:
}
if (role == Qt::DecorationRole) {
if (!widget->isValid()) {
static const QIcon errorIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Core::Constants::ICON_ERROR)));
static const QIcon errorIcon(Core::Icons::ERROR.icon());
return errorIcon;
}
if (widget->hasWarning()) {
static const QIcon warningIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(Core::Constants::ICON_WARNING)));
static const QIcon warningIcon(Core::Icons::WARNING.icon());
return warningIcon;
}
return QIcon();
@@ -33,6 +33,7 @@
#include "environmentaspect.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorericons.h>
#include <utils/qtcassert.h>
#include <utils/environment.h>
@@ -76,7 +77,7 @@ RunControl *LocalApplicationRunControlFactory::create(RunConfiguration *runConfi
LocalApplicationRunControl::LocalApplicationRunControl(RunConfiguration *rc, Core::Id mode)
: RunControl(rc, mode), m_runMode(ApplicationLauncher::Console), m_running(false)
{
setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
setIcon(Icons::RUN_SMALL);
EnvironmentAspect *environment = rc->extraAspect<EnvironmentAspect>();
Utils::Environment env;
if (environment)
+10 -11
View File
@@ -92,6 +92,7 @@
#include "targetsettingspanel.h"
#include "projectpanelfactory.h"
#include "waitforstopdialog.h"
#include "projectexplorericons.h"
#ifdef Q_OS_WIN
# include "windebuginterface.h"
@@ -131,7 +132,6 @@
#include <utils/parameteraction.h>
#include <utils/qtcassert.h>
#include <utils/stringutils.h>
#include <utils/themehelper.h>
#include <QtPlugin>
#include <QDebug>
@@ -704,8 +704,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
ActionContainer *runMenu = ActionManager::createMenu(Constants::RUNMENUCONTEXTMENU);
runMenu->setOnAllDisabledBehavior(ActionContainer::Hide);
QIcon runIcon = QIcon(QLatin1String(Constants::ICON_RUN));
runIcon.addPixmap(Utils::ThemeHelper::themedIconPixmap(QLatin1String(Constants::ICON_RUN_SMALL)));
QIcon runIcon = Icons::RUN.icon();
runIcon.addPixmap(Icons::RUN_SMALL.pixmap());
runMenu->menu()->setIcon(runIcon);
runMenu->menu()->setTitle(tr("Run"));
msubProjectContextMenu->addMenu(runMenu, ProjectExplorer::Constants::G_PROJECT_RUN);
@@ -839,8 +839,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES);
// build session action
QIcon buildIcon = QIcon(QLatin1String(Constants::ICON_BUILD));
buildIcon.addFile(QLatin1String(Constants::ICON_BUILD_SMALL));
QIcon buildIcon = Icons::BUILD.icon();
buildIcon.addPixmap(Icons::BUILD_SMALL.pixmap());
dd->m_buildSessionAction = new QAction(buildIcon, tr("Build All"), this);
cmd = ActionManager::registerAction(dd->m_buildSessionAction, Constants::BUILDSESSION);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+B")));
@@ -854,16 +854,16 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
msessionContextMenu->addAction(cmd, Constants::G_SESSION_BUILD);
// rebuild session action
QIcon rebuildIcon = QIcon(QLatin1String(Constants::ICON_REBUILD));
rebuildIcon.addFile(QLatin1String(Constants::ICON_REBUILD_SMALL));
QIcon rebuildIcon = Icons::REBUILD.icon();
rebuildIcon.addPixmap(Icons::REBUILD_SMALL.pixmap());
dd->m_rebuildSessionAction = new QAction(rebuildIcon, tr("Rebuild All"), this);
cmd = ActionManager::registerAction(dd->m_rebuildSessionAction, Constants::REBUILDSESSION);
mbuild->addAction(cmd, Constants::G_BUILD_REBUILD);
msessionContextMenu->addAction(cmd, Constants::G_SESSION_REBUILD);
// clean session
QIcon cleanIcon = QIcon(QLatin1String(Constants::ICON_CLEAN));
cleanIcon.addFile(QLatin1String(Constants::ICON_CLEAN_SMALL));
QIcon cleanIcon = Icons::CLEAN.icon();
cleanIcon.addPixmap(Icons::CLEAN_SMALL.pixmap());
dd->m_cleanSessionAction = new QAction(cleanIcon, tr("Clean All"), this);
cmd = ActionManager::registerAction(dd->m_cleanSessionAction, Constants::CLEANSESSION);
mbuild->addAction(cmd, Constants::G_BUILD_CLEAN);
@@ -907,8 +907,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mbuild->addAction(cmd, Constants::G_BUILD_CLEAN);
// cancel build action
const QIcon stopIcon = Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_STOP_SMALL));
dd->m_cancelBuildAction = new QAction(stopIcon, tr("Cancel Build"), this);
dd->m_cancelBuildAction = new QAction(Icons::STOP_SMALL.icon(), tr("Cancel Build"), this);
cmd = ActionManager::registerAction(dd->m_cancelBuildAction, Constants::CANCELBUILD);
mbuild->addAction(cmd, Constants::G_BUILD_CANCEL);
@@ -153,7 +153,8 @@ HEADERS += projectexplorer.h \
projectpanelfactory.h \
projecttree.h \
expanddata.h \
waitforstopdialog.h
waitforstopdialog.h \
projectexplorericons.h
SOURCES += projectexplorer.cpp \
abi.cpp \
@@ -111,6 +111,7 @@ QtcPlugin {
"projectexplorer.qrc",
"projectexplorer_export.h",
"projectexplorerconstants.h",
"projectexplorericons.h",
"projectexplorersettings.h",
"projectexplorersettingspage.cpp", "projectexplorersettingspage.h", "projectexplorersettingspage.ui",
"projectfilewizardextension.cpp", "projectfilewizardextension.h",
@@ -155,19 +155,6 @@ const char RUNMENUCONTEXTMENU[] = "Project.RunMenu";
// File factory
const char FILE_FACTORY_ID[] = "ProjectExplorer.FileFactoryId";
// Icons
const char ICON_BUILD[] = ":/projectexplorer/images/build.png";
const char ICON_BUILD_SMALL[] = ":/projectexplorer/images/build_small.png";
const char ICON_CLEAN[] = ":/projectexplorer/images/clean.png";
const char ICON_CLEAN_SMALL[] = ":/projectexplorer/images/clean_small.png";
const char ICON_REBUILD[] = ":/projectexplorer/images/rebuild.png";
const char ICON_REBUILD_SMALL[] = ":/projectexplorer/images/rebuild_small.png";
const char ICON_RUN[] = ":/projectexplorer/images/run.png";
const char ICON_RUN_SMALL[] = ":/projectexplorer/images/run_small.png|IconsRunColor";
const char ICON_STOP[] = ":/projectexplorer/images/stop.png";
const char ICON_STOP_SMALL[] = ":/projectexplorer/images/stop_small.png|IconsStopColor";
const char ICON_WINDOW[] = ":/projectexplorer/images/window.png";
// Mime types
const char C_SOURCE_MIMETYPE[] = "text/x-csrc";
const char C_HEADER_MIMETYPE[] = "text/x-chdr";
@@ -0,0 +1,66 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef PROJECTEXPLORERICONS_H
#define PROJECTEXPLORERICONS_H
#include <utils/icon.h>
namespace ProjectExplorer {
namespace Icons {
const Utils::Icon BUILD(
QLatin1String(":/projectexplorer/images/build.png"));
const Utils::Icon BUILD_SMALL(
QLatin1String(":/projectexplorer/images/build_small.png"));
const Utils::Icon CLEAN(
QLatin1String(":/projectexplorer/images/clean.png"));
const Utils::Icon CLEAN_SMALL(
QLatin1String(":/projectexplorer/images/clean_small.png"));
const Utils::Icon REBUILD(
QLatin1String(":/projectexplorer/images/rebuild.png"));
const Utils::Icon REBUILD_SMALL(
QLatin1String(":/projectexplorer/images/rebuild_small.png"));
const Utils::Icon RUN(
QLatin1String(":/projectexplorer/images/run.png"));
const Utils::Icon WINDOW(
QLatin1String(":/projectexplorer/images/window.png"));
const Utils::Icon DEBUG_START(
QLatin1String(":/projectexplorer/images/debugger_start.png"));
const Utils::Icon RUN_SMALL({
{QLatin1String(":/projectexplorer/images/run_small.png"), Utils::Theme::IconsRunColor}});
const Utils::Icon STOP_SMALL({
{QLatin1String(":/projectexplorer/images/stop_small.png"), Utils::Theme::IconsStopColor}});
} // namespace Icons
} // namespace ProjectExplorer
#endif // PROJECTEXPLORERICONS_H
@@ -38,7 +38,7 @@
#include "projecttree.h"
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
@@ -49,7 +49,6 @@
#include <utils/navigationtreeview.h>
#include <utils/algorithm.h>
#include <utils/tooltip/tooltip.h>
#include <utils/themehelper.h>
#include <QDebug>
#include <QSettings>
@@ -234,8 +233,7 @@ ProjectTreeWidget::ProjectTreeWidget(QWidget *parent)
this, SLOT(saveExpandData()));
m_toggleSync = new QToolButton;
m_toggleSync->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_LINK)));
m_toggleSync->setIcon(Core::Icons::LINK.icon());
m_toggleSync->setCheckable(true);
m_toggleSync->setChecked(autoSynchronization());
m_toggleSync->setToolTip(tr("Synchronize with Editor"));
@@ -589,7 +587,7 @@ NavigationView ProjectTreeWidgetFactory::createWidget()
n.widget = ptw;
QToolButton *filter = new QToolButton;
filter->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
filter->setIcon(Core::Icons::FILTER.icon());
filter->setToolTip(tr("Filter Tree"));
filter->setPopupMode(QToolButton::InstantPopup);
filter->setProperty("noArrow", true);
@@ -551,6 +551,16 @@ QString RunControl::displayName() const
return m_displayName;
}
void RunControl::setIcon(const Utils::Icon &icon)
{
m_icon = icon;
}
Utils::Icon RunControl::icon() const
{
return m_icon;
}
Abi RunControl::abi() const
{
if (const RunConfiguration *rc = m_runConfiguration.data())
@@ -37,6 +37,7 @@
#include <utils/outputformat.h>
#include <utils/qtcassert.h>
#include <utils/icon.h>
#include <QPointer>
#include <QWidget>
@@ -293,8 +294,8 @@ public:
virtual QString displayName() const;
virtual bool supportsReRunning() const { return true; }
void setIcon(const QString &icon) { m_icon = icon; }
QString icon() const { return m_icon; }
void setIcon(const Utils::Icon &icon);
Utils::Icon icon() const;
ProcessHandle applicationProcessHandle() const;
void setApplicationProcessHandle(const ProcessHandle &handle);
@@ -330,7 +331,7 @@ protected:
private:
QString m_displayName;
Core::Id m_runMode;
QString m_icon;
Utils::Icon m_icon;
const QPointer<RunConfiguration> m_runConfiguration;
QPointer<Project> m_project;
Utils::OutputFormatter *m_outputFormatter;
@@ -34,7 +34,7 @@
#include "runconfiguration.h"
#include "environmentaspect.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <utils/fancylineedit.h>
#include <utils/pathchooser.h>
@@ -169,7 +169,7 @@ void WorkingDirectoryAspect::addToMainConfigurationWidget(QWidget *parent, QForm
auto resetButton = new QToolButton(parent);
resetButton->setToolTip(tr("Reset to Default"));
resetButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_RESET)));
resetButton->setIcon(Core::Icons::RESET.icon());
connect(resetButton, &QAbstractButton::clicked, this, &WorkingDirectoryAspect::resetPath);
if (auto envAspect = runConfiguration()->extraAspect<EnvironmentAspect>()) {
+3 -4
View File
@@ -30,9 +30,8 @@
#include "task.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include "projectexplorerconstants.h"
@@ -42,8 +41,8 @@ namespace ProjectExplorer
static QIcon taskTypeIcon(Task::TaskType t)
{
static QIcon icons[3] = { QIcon(),
Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_ERROR)),
Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING))};
Core::Icons::ERROR.icon(),
Core::Icons::WARNING.icon()};
if (t < 0 || t > 2)
t = Task::Unknown;
+3 -4
View File
@@ -31,11 +31,10 @@
#include "taskhub.h"
#include "projectexplorerconstants.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreicons.h>
#include <coreplugin/ioutputpane.h>
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
#include <utils/themehelper.h>
using namespace ProjectExplorer;
@@ -102,8 +101,8 @@ void TaskMark::clicked()
}
TaskHub::TaskHub()
: m_errorIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_ERROR))),
m_warningIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING)))
: m_errorIcon(Core::Icons::ERROR.icon()),
m_warningIcon(Core::Icons::WARNING.icon())
{
m_instance = this;
qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task");
+5 -6
View File
@@ -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);
@@ -51,6 +51,7 @@
#include <projectexplorer/target.h>
#include <projectexplorer/iprojectmanager.h>
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/projectexplorericons.h>
#include <texteditor/texteditorconstants.h>
@@ -1096,7 +1097,7 @@ RunControl *PythonRunControlFactory::create(RunConfiguration *runConfiguration,
PythonRunControl::PythonRunControl(PythonRunConfiguration *rc, Core::Id mode)
: RunControl(rc, mode), m_running(false)
{
setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
setIcon(ProjectExplorer::Icons::RUN_SMALL);
EnvironmentAspect *environment = rc->extraAspect<EnvironmentAspect>();
Utils::Environment env;
if (environment)

Some files were not shown because too many files have changed in this diff Show More