forked from qt-creator/qt-creator
Icon refresh: First step towards the new Qt Creator themes
http://blog.qt.io/blog/author/didesous/ announced new designs/themes for Qt Creator. This patch replaces many of the existing toolbar icons with recolorizable masks for better theming support. Change-Id: I557aa485205fe2624f33724226f698c303342b40 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/outputformatter.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/themehelper.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QVBoxLayout>
|
||||
@@ -163,7 +164,7 @@ AppOutputPane::AppOutputPane() :
|
||||
setObjectName(QLatin1String("AppOutputPane")); // Used in valgrind engine
|
||||
|
||||
// Rerun
|
||||
m_reRunButton->setIcon(QIcon(QLatin1String(Constants::ICON_RUN_SMALL)));
|
||||
m_reRunButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_RUN_SMALL)));
|
||||
m_reRunButton->setToolTip(tr("Re-run this run-configuration"));
|
||||
m_reRunButton->setAutoRaise(true);
|
||||
m_reRunButton->setEnabled(false);
|
||||
@@ -171,9 +172,7 @@ AppOutputPane::AppOutputPane() :
|
||||
this, SLOT(reRunRunControl()));
|
||||
|
||||
// Stop
|
||||
QIcon stopIcon = QIcon(QLatin1String(Constants::ICON_STOP));
|
||||
stopIcon.addFile(QLatin1String(Constants::ICON_STOP_SMALL));
|
||||
m_stopAction->setIcon(stopIcon);
|
||||
m_stopAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_STOP_SMALL)));
|
||||
m_stopAction->setToolTip(tr("Stop"));
|
||||
m_stopAction->setEnabled(false);
|
||||
|
||||
@@ -188,21 +187,24 @@ AppOutputPane::AppOutputPane() :
|
||||
// Attach
|
||||
m_attachButton->setToolTip(msgAttachDebuggerTooltip());
|
||||
m_attachButton->setEnabled(false);
|
||||
m_attachButton->setIcon(QIcon(QLatin1String(Constants::ICON_DEBUG_SMALL)));
|
||||
m_attachButton->setIcon(Utils::ThemeHelper::themedIcon(
|
||||
QLatin1String(Core::Constants::ICON_DEBUG_START_SMALL)));
|
||||
m_attachButton->setAutoRaise(true);
|
||||
|
||||
connect(m_attachButton, SIGNAL(clicked()),
|
||||
this, SLOT(attachToRunControl()));
|
||||
|
||||
m_zoomInButton->setToolTip(tr("Increase Font Size"));
|
||||
m_zoomInButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_PLUS)));
|
||||
m_zoomInButton->setIcon(Utils::ThemeHelper::themedIcon(
|
||||
QLatin1String(Core::Constants::ICON_PLUS)));
|
||||
m_zoomInButton->setAutoRaise(true);
|
||||
|
||||
connect(m_zoomInButton, &QToolButton::clicked,
|
||||
this, &AppOutputPane::zoomIn);
|
||||
|
||||
m_zoomOutButton->setToolTip(tr("Decrease Font Size"));
|
||||
m_zoomOutButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_MINUS)));
|
||||
m_zoomOutButton->setIcon(Utils::ThemeHelper::themedIcon(
|
||||
QLatin1String(Core::Constants::ICON_MINUS)));
|
||||
m_zoomOutButton->setAutoRaise(true);
|
||||
|
||||
connect(m_zoomOutButton, &QToolButton::clicked,
|
||||
@@ -640,7 +642,7 @@ void AppOutputPane::enableButtons(const RunControl *rc /* = 0 */, bool isRunning
|
||||
{
|
||||
if (rc) {
|
||||
m_reRunButton->setEnabled(!isRunning && rc->supportsReRunning());
|
||||
m_reRunButton->setIcon(QIcon(rc->icon()));
|
||||
m_reRunButton->setIcon(Utils::ThemeHelper::themedIcon(rc->icon()));
|
||||
m_stopAction->setEnabled(isRunning);
|
||||
if (isRunning && debuggerPlugin() && rc->applicationProcessHandle().isValid()) {
|
||||
m_attachButton->setEnabled(true);
|
||||
@@ -653,7 +655,7 @@ void AppOutputPane::enableButtons(const RunControl *rc /* = 0 */, bool isRunning
|
||||
m_zoomOutButton->setEnabled(true);
|
||||
} else {
|
||||
m_reRunButton->setEnabled(false);
|
||||
m_reRunButton->setIcon(QIcon(QLatin1String(Constants::ICON_RUN_SMALL)));
|
||||
m_reRunButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_RUN_SMALL)));
|
||||
m_attachButton->setEnabled(false);
|
||||
m_attachButton->setToolTip(msgAttachDebuggerTooltip());
|
||||
m_stopAction->setEnabled(false);
|
||||
|
||||
Reference in New Issue
Block a user