Commit b8bdc6f6 authored by Alessandro Portale's avatar Alessandro Portale

Icon refresh: First step towards the new Qt Creator themes

http://blog.qt.io/blog/author/didesous/ announced new designs/themes
for Qt Creator. This patch replaces many of the existing toolbar icons
with recolorizable masks for better theming support.

Change-Id: I557aa485205fe2624f33724226f698c303342b40
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@theqtcompany.com>
parent e6d03836
......@@ -33,6 +33,8 @@
#include "historycompleter.h"
#include "hostosinfo.h"
#include "qtcassert.h"
#include "themehelper.h"
#include "stylehelper.h"
#include <QAbstractItemView>
#include <QDebug>
......@@ -366,7 +368,10 @@ void FancyLineEdit::setFiltering(bool on)
QIcon icon = QIcon::fromTheme(layoutDirection() == Qt::LeftToRight ?
QLatin1String("edit-clear-locationbar-rtl") :
QLatin1String("edit-clear-locationbar-ltr"),
QIcon::fromTheme(QLatin1String("edit-clear"), QIcon(QLatin1String(":/core/images/editclear.png"))));
QIcon::fromTheme(QLatin1String("edit-clear"),
ThemeHelper::recoloredPixmap(
QLatin1String(":/core/images/editclear.png"),
ThemeHelper::inputfieldIconColor())));
setButtonPixmap(Right, icon.pixmap(16));
setButtonVisible(Right, true);
......
......@@ -35,15 +35,15 @@ QtcPlugin {
"ianalyzertool.h",
"startremotedialog.cpp",
"startremotedialog.h",
"images/analyzer_category.png",
"images/analyzer_start_small.png",
"images/analyzer_stop_small.png",
"images/mode_analyze.png",
"images/mode_analyze@2x.png",
]
Group {
name: "Images"
prefix: "images/"
files: ["*.png"]
}
Export {
Depends { name: "CPlusPlus" }
}
}
......@@ -3,7 +3,7 @@
<file>images/mode_analyze.png</file>
<file>images/mode_analyze@2x.png</file>
<file>images/analyzer_category.png</file>
<file>images/analyzer_start_small.png</file>
<file>images/analyzer_stop_small.png</file>
<file>images/analyzer_overlay_small.png</file>
<file>images/analyzer_overlay_small@2x.png</file>
</qresource>
</RCC>
......@@ -54,8 +54,7 @@ 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_start_small.png";
const char ANALYZER_CONTROL_STOP_ICON[] = ":/images/analyzer_stop_small.png";
const char ANALYZER_CONTROL_START_ICON[] = ":/images/analyzer_overlay_small.png,:/core/images/run_overlay_small.png|IconsRunColor";
const char ANALYZERTASK_ID[] = "Analyzer.TaskId";
......
......@@ -61,6 +61,7 @@
#include <utils/qtcassert.h>
#include <utils/checkablemessagebox.h>
#include <utils/statuslabel.h>
#include <utils/themehelper.h>
#include <QVariant>
#include <QDebug>
......@@ -240,14 +241,16 @@ void AnalyzerManagerPrivate::setupActions()
menubar->addMenu(mtools, m_menu);
m_startAction = new QAction(tr("Start"), m_menu);
m_startAction->setIcon(QIcon(QLatin1String(ANALYZER_CONTROL_START_ICON)));
m_startAction->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(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(QIcon(QLatin1String(ANALYZER_CONTROL_STOP_ICON)));
m_stopAction->setIcon(Utils::ThemeHelper::themedIcon(
QLatin1String(ProjectExplorer::Constants::ICON_STOP_SMALL)));
command = ActionManager::registerAction(m_stopAction, "Analyzer.Stop");
m_menu->addAction(command, G_ANALYZER_CONTROL);
......
......@@ -51,7 +51,7 @@ AnalyzerRunControl::AnalyzerRunControl(const AnalyzerStartParameters &sp,
RunConfiguration *runConfiguration)
: RunControl(runConfiguration, sp.runMode)
{
setIcon(QLatin1String(":/images/analyzer_start_small.png"));
setIcon(QLatin1String(Constants::ANALYZER_CONTROL_START_ICON));
m_sp = sp;
......
......@@ -36,6 +36,7 @@
#include "androidmanager.h"
#include "ui_androidbuildapkwidget.h"
#include <coreplugin/coreconstants.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
......@@ -43,6 +44,7 @@
#include <utils/fancylineedit.h>
#include <utils/pathchooser.h>
#include <utils/themehelper.h>
#include <QFileDialog>
......@@ -89,8 +91,12 @@ 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->hide();
m_ui->signingDebugWarningLabel->hide();
m_ui->signingDebugDeployErrorIcon->setPixmap(
Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_ERROR)));
signPackageCheckBoxToggled(m_step->signPackage());
m_ui->useGradleCheckBox->setChecked(m_step->useGradle());
......
......@@ -65,12 +65,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../coreplugin/core.qrc">:/core/images/warning.png</pixmap>
</property>
</widget>
</item>
<item>
......@@ -133,12 +127,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../coreplugin/core.qrc">:/core/images/error.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
......@@ -265,8 +253,6 @@ The APK will not be usable on any other device.</string>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../coreplugin/core.qrc"/>
</resources>
<resources/>
<connections/>
</ui>
......@@ -50,6 +50,7 @@
#include <texteditor/texteditoractionhandler.h>
#include <texteditor/texteditor.h>
#include <utils/algorithm.h>
#include <utils/themehelper.h>
#include <QLineEdit>
#include <QFileInfo>
......@@ -166,7 +167,8 @@ void AndroidManifestEditorWidget::initializePage()
m_packageNameWarning->setVisible(false);
m_packageNameWarningIcon = new QLabel;
m_packageNameWarningIcon->setPixmap(QPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
m_packageNameWarningIcon->setPixmap(
Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
m_packageNameWarningIcon->setVisible(false);
m_packageNameWarningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
......
......@@ -33,6 +33,7 @@
#include "androidconfigurations.h"
#include <utils/detailswidget.h>
#include <utils/themehelper.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <projectexplorer/kitmanager.h>
......@@ -92,7 +93,7 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
: Utils::DetailsWidget(parent)
{
setSummaryText(QLatin1String("<b>Android has not been configured. Create Android kits.</b>"));
setIcon(QIcon(QLatin1String(Core::Constants::ICON_WARNING)));
setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING)));
//detailsWidget->setState(Utils::DetailsWidget::NoSummary);
QWidget *mainWidget = new QWidget(this);
setWidget(mainWidget);
......
......@@ -36,9 +36,11 @@
#include "androidconstants.h"
#include "androidtoolchain.h"
#include <coreplugin/coreconstants.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>
......@@ -174,6 +176,17 @@ 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));
m_ui->jdkWarningIconLabel->setPixmap(warningPixmap);
m_ui->kitWarningIconLabel->setPixmap(warningPixmap);
const QPixmap errorPixmap = Utils::ThemeHelper::themedIconPixmap(
QLatin1String(Core::Constants::ICON_ERROR));
m_ui->sdkWarningIconLabel->setPixmap(errorPixmap);
m_ui->gdbWarningIconLabel->setPixmap(errorPixmap);
m_ui->ndkWarningIconLabel->setPixmap(errorPixmap);
connect(m_ui->gdbWarningLabel, SIGNAL(linkActivated(QString)),
this, SLOT(showGdbWarningDialog()));
......
......@@ -46,9 +46,6 @@
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../coreplugin/core.qrc">:/core/images/warning.png</pixmap>
</property>
</widget>
</item>
<item>
......@@ -123,9 +120,6 @@
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../coreplugin/core.qrc">:/core/images/error.png</pixmap>
</property>
</widget>
</item>
<item>
......@@ -192,9 +186,6 @@
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../coreplugin/core.qrc">:/core/images/error.png</pixmap>
</property>
</widget>
</item>
<item>
......@@ -228,9 +219,6 @@
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../coreplugin/core.qrc">:/core/images/error.png</pixmap>
</property>
</widget>
</item>
<item>
......@@ -280,9 +268,6 @@
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../coreplugin/core.qrc">:/core/images/warning.png</pixmap>
</property>
</widget>
</item>
<item>
......@@ -476,7 +461,6 @@
</customwidget>
</customwidgets>
<resources>
<include location="../coreplugin/core.qrc"/>
<include location="android.qrc"/>
</resources>
<connections>
......
......@@ -33,6 +33,7 @@
#include <coreplugin/coreconstants.h>
#include <utils/tooltip/tooltip.h>
#include <utils/themehelper.h>
#include <QKeyEvent>
#include <QMessageBox>
......@@ -62,7 +63,8 @@ AvdDialog::AvdDialog(int minApiLevel, const QString &targetArch, const AndroidCo
m_avdDialog.nameLineEdit->setValidator(v);
m_avdDialog.nameLineEdit->installEventFilter(this);
m_avdDialog.warningIcon->setPixmap(QPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
m_avdDialog.warningIcon->setPixmap(Utils::ThemeHelper::themedIconPixmap(
QLatin1String(Core::Constants::ICON_WARNING)));
updateApiLevelComboBox();
......
......@@ -33,6 +33,7 @@
#include <coreplugin/coreconstants.h>
#include <utils/detailswidget.h>
#include <utils/themehelper.h>
#include <QLineEdit>
#include <QFormLayout>
......@@ -90,7 +91,8 @@ void BareMetalRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout)
{
QHBoxLayout * const hl = new QHBoxLayout;
hl->addStretch();
d->disabledIcon.setPixmap(QPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
d->disabledIcon.setPixmap(Utils::ThemeHelper::themedIconPixmap(
QLatin1String(Core::Constants::ICON_WARNING)));
hl->addWidget(&d->disabledIcon);
d->disabledReason.setVisible(false);
hl->addWidget(&d->disabledReason);
......
......@@ -38,6 +38,7 @@
#include <QApplication>
#include <utils/tooltip/tooltip.h>
#include <utils/themehelper.h>
namespace ClangCodeModel {
......@@ -73,8 +74,8 @@ ClangTextMark::ClangTextMark(const QString &fileName, int lineNumber, ClangBackE
void ClangTextMark::setIcon(ClangBackEnd::DiagnosticSeverity severity)
{
static const QIcon errorIcon{QLatin1String(Core::Constants::ICON_ERROR)};
static const QIcon warningIcon{QLatin1String(Core::Constants::ICON_WARNING)};
static const QIcon errorIcon{Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_ERROR))};
static const QIcon warningIcon{Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING))};
if (isWarningOrNote(severity))
TextMark::setIcon(warningIcon);
......
<RCC>
<qresource prefix="/core">
<file>images/clean_pane_small.png</file>
<file>images/clean_pane_small@2x.png</file>
<file>images/clear.png</file>
<file>images/clear@2x.png</file>
<file>images/closebutton.png</file>
......@@ -26,10 +27,10 @@
<file>images/locked@2x.png</file>
<file>images/magnifier.png</file>
<file>images/magnifier@2x.png</file>
<file>images/dark_magnifier.png</file>
<file>images/dark_magnifier@2x.png</file>
<file>images/minus.png</file>
<file>images/minus@2x.png</file>
<file>images/next.png</file>
<file>images/next@2x.png</file>
<file>images/panel_button.png</file>
<file>images/panel_button@2x.png</file>
<file>images/panel_button_checked.png</file>
......@@ -41,7 +42,9 @@
<file>images/panel_button_pressed.png</file>
<file>images/panel_button_pressed@2x.png</file>
<file>images/plus.png</file>
<file>images/plus@2x.png</file>
<file>images/prev.png</file>
<file>images/prev@2x.png</file>
<file>images/pushbutton.png</file>
<file>images/pushbutton_hover.png</file>
<file>images/pushbutton_pressed.png</file>
......@@ -49,6 +52,7 @@
<file>images/replace.png</file>
<file>images/reset.png</file>
<file>images/sidebaricon.png</file>
<file>images/sidebaricon@2x.png</file>
<file>images/splitbutton_horizontal.png</file>
<file>images/splitbutton_horizontal@2x.png</file>
<file>images/statusbar.png</file>
......@@ -113,5 +117,17 @@
<file>images/dark_fileicon.png</file>
<file>images/dark_foldericon.png</file>
<file>images/Desktop.png</file>
<file>images/run_overlay_small.png</file>
<file>images/run_overlay_small@2x.png</file>
<file>images/stop_overlay_small.png</file>
<file>images/stop_overlay_small@2x.png</file>
<file>images/debugger_overlay_small.png</file>
<file>images/debugger_overlay_small@2x.png</file>
<file>images/interrupt_overlay_small.png</file>
<file>images/interrupt_overlay_small@2x.png</file>
<file>images/continue_overlay_small.png</file>
<file>images/continue_overlay_small@2x.png</file>
<file>images/zoom.png</file>
<file>images/zoom@2x.png</file>
</qresource>
</RCC>
......@@ -194,8 +194,8 @@ 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";
const char ICON_PREV[] = ":/core/images/prev.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";
......@@ -219,9 +219,14 @@ 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";
const char ICON_ERROR[] = ":/core/images/error.png";
const char ICON_INFO[] = ":/core/images/info.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");
......
......@@ -74,6 +74,7 @@
#include <utils/mimetypes/mimetype.h>
#include <utils/qtcassert.h>
#include <utils/overridecursor.h>
#include <utils/themehelper.h>
#include <QClipboard>
#include <QDateTime>
......@@ -267,8 +268,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(QIcon(QLatin1String(Constants::ICON_PREV)), EditorManager::tr("Go Back"), this)),
m_goForwardAction(new QAction(QIcon(QLatin1String(Constants::ICON_NEXT)), EditorManager::tr("Go Forward"), 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_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)),
......
......@@ -45,6 +45,7 @@
#include <coreplugin/findplaceholder.h>
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
#include <utils/themehelper.h>
#include <QDebug>
......@@ -703,11 +704,15 @@ void SplitterOrView::split(Qt::Orientation orientation)
view->view()->setCurrentEditor(duplicate);
if (orientation == Qt::Horizontal) {
view->view()->setCloseSplitIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
otherView->view()->setCloseSplitIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_RIGHT)));
view->view()->setCloseSplitIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
otherView->view()->setCloseSplitIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_RIGHT)));
} else {
view->view()->setCloseSplitIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
otherView->view()->setCloseSplitIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
view->view()->setCloseSplitIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
otherView->view()->setCloseSplitIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
}
EditorManagerPrivate::activateView(otherView->view());
......@@ -795,17 +800,14 @@ void SplitterOrView::unsplit()
m_layout->addWidget(m_view);
QSplitter *parentSplitter = qobject_cast<QSplitter *>(parentWidget());
if (parentSplitter) { // not the toplevel splitterOrView
if (parentSplitter->orientation() == Qt::Horizontal) {
if (parentSplitter->widget(0) == this)
m_view->setCloseSplitIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
else
m_view->setCloseSplitIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_RIGHT)));
} else {
if (parentSplitter->widget(0) == this)
m_view->setCloseSplitIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
else
m_view->setCloseSplitIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
}
if (parentSplitter->orientation() == Qt::Horizontal)
Utils::ThemeHelper::themedIcon(QLatin1String(parentSplitter->widget(0) == this ?
Constants::ICON_CLOSE_SPLIT_LEFT
: Constants::ICON_CLOSE_SPLIT_RIGHT));
else
Utils::ThemeHelper::themedIcon(QLatin1String(parentSplitter->widget(0) == this ?
Constants::ICON_CLOSE_SPLIT_TOP
: Constants::ICON_CLOSE_SPLIT_BOTTOM));
}
}
m_layout->setCurrentWidget(m_view);
......
......@@ -43,6 +43,7 @@
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
#include <utils/themehelper.h>
#include <QApplication>
#include <QComboBox>
......@@ -99,13 +100,13 @@ EditorToolBarPrivate::EditorToolBarPrivate(QWidget *parent, EditorToolBar *q) :
m_lockButton(new QToolButton(q)),
m_dragHandle(new QToolButton(q)),
m_dragHandleMenu(0),
m_goBackAction(new QAction(QIcon(QLatin1String(Constants::ICON_PREV)), EditorManager::tr("Go Back"), parent)),
m_goForwardAction(new QAction(QIcon(QLatin1String(Constants::ICON_NEXT)), EditorManager::tr("Go Forward"), parent)),
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_backButton(new QToolButton(q)),
m_forwardButton(new QToolButton(q)),
m_splitButton(new QToolButton(q)),
m_horizontalSplitAction(new QAction(QIcon(QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)), EditorManager::tr("Split"), parent)),
m_verticalSplitAction(new QAction(QIcon(QLatin1String(Constants::ICON_SPLIT_VERTICAL)), EditorManager::tr("Split Side by Side"), parent)),
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_splitNewWindowAction(new QAction(EditorManager::tr("Open in New Window"), parent)),
m_closeSplitButton(new QToolButton(q)),
m_activeToolBar(0),
......@@ -152,7 +153,8 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_editorList->setContextMenuPolicy(Qt::CustomContextMenu);
d->m_closeEditorButton->setAutoRaise(true);
d->m_closeEditorButton->setIcon(QIcon(QLatin1String(Constants::ICON_BUTTON_CLOSE)));
d->m_closeEditorButton->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_BUTTON_CLOSE)));
d->m_closeEditorButton->setEnabled(false);
d->m_closeEditorButton->setProperty("showborder", true);
......@@ -168,7 +170,8 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_splitNewWindowAction->setIconVisibleInMenu(false);
}
d->m_splitButton->setIcon(QIcon(QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)));
d->m_splitButton->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)));
d->m_splitButton->setToolTip(tr("Split"));
d->m_splitButton->setPopupMode(QToolButton::InstantPopup);
d->m_splitButton->setProperty("noArrow", true);
......@@ -179,7 +182,8 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_splitButton->setMenu(splitMenu);
d->m_closeSplitButton->setAutoRaise(true);
d->m_closeSplitButton->setIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
d->m_closeSplitButton->setIcon(
Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
QHBoxLayout *toplayout = new QHBoxLayout(this);
toplayout->setSpacing(0);
......
......@@ -4,6 +4,7 @@
<file>images/wholewords.png</file>
<file>images/regexp.png</file>
<file>images/expand.png</file>
<file>images/expand@2x.png</file>
<file>images/wrapindicator.png</file>
<file>images/preservecase.png</file>
</qresource>
......
......@@ -47,6 +47,7 @@
#include <utils/qtcassert.h>
#include <utils/stylehelper.h>
#include <utils/theme/theme.h>
#include <utils/themehelper.h>
#include <QDebug>
#include <QSettings>
......@@ -667,8 +668,10 @@ void FindToolBar::updateIcons()
bool regexp = effectiveFlags & FindRegularExpression;
bool preserveCase = effectiveFlags & FindPreserveCase;
if (!casesensitive && !wholewords && !regexp && !preserveCase) {
m_ui.findEdit->setButtonPixmap(Utils::FancyLineEdit::Left,
Utils::StyleHelper::dpiSpecificImageFile(QLatin1Literal(Constants::ICON_MAGNIFIER)));
const QPixmap pixmap = Utils::ThemeHelper::recoloredPixmap(
QLatin1String(Constants::ICON_MAGNIFIER),
Utils::ThemeHelper::inputfieldIconColor());
m_ui.findEdit->setButtonPixmap(Utils::FancyLineEdit::Left, pixmap);
} else {
m_ui.findEdit->setButtonPixmap(Utils::FancyLineEdit::Left,
IFindFilter::pixmapForFindFlags(effectiveFlags));
......@@ -958,8 +961,19 @@ void FindToolBar::setBackward(bool backward)