forked from qt-creator/qt-creator
Centralize error/warning/info icons
There are multiple copies of these pngs in different plugins. Let's have one version in core, also as @2x variant. Change-Id: Iedff1a6190a72c1947dd202ae1ee46f59f9fb13c Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -30,6 +30,8 @@
|
||||
#include "qmlconsoleitemdelegate.h"
|
||||
#include "qmlconsoleedit.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
|
||||
#include <QPainter>
|
||||
#include <QTreeView>
|
||||
#include <QScrollBar>
|
||||
@@ -68,9 +70,9 @@ namespace Internal {
|
||||
|
||||
QmlConsoleItemDelegate::QmlConsoleItemDelegate(QObject *parent) :
|
||||
QStyledItemDelegate(parent),
|
||||
m_logIcon(QLatin1String(":/qmljstools/images/log.png")),
|
||||
m_warningIcon(QLatin1String(":/qmljstools/images/warning.png")),
|
||||
m_errorIcon(QLatin1String(":/qmljstools/images/error.png")),
|
||||
m_logIcon(QLatin1String(Core::Constants::ICON_INFO)),
|
||||
m_warningIcon(QLatin1String(Core::Constants::ICON_WARNING)),
|
||||
m_errorIcon(QLatin1String(Core::Constants::ICON_ERROR)),
|
||||
m_expandIcon(QLatin1String(":/qmljstools/images/expand.png")),
|
||||
m_collapseIcon(QLatin1String(":/qmljstools/images/collapse.png")),
|
||||
m_prompt(QLatin1String(":/qmljstools/images/prompt.png")),
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "qmlconsoleproxymodel.h"
|
||||
#include "qmlconsoleitemdelegate.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/findplaceholder.h>
|
||||
#include <utils/savedaction.h>
|
||||
@@ -108,7 +109,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
|
||||
m_showDebugButtonAction->setSettingsKey(QLatin1String(CONSOLE), QLatin1String(SHOW_LOG));
|
||||
m_showDebugButtonAction->setToolTip(tr("Show debug, log, and info messages."));
|
||||
m_showDebugButtonAction->setCheckable(true);
|
||||
m_showDebugButtonAction->setIcon(QIcon(QLatin1String(":/qmljstools/images/log.png")));
|
||||
m_showDebugButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_INFO)));
|
||||
connect(m_showDebugButtonAction, SIGNAL(toggled(bool)), m_proxyModel, SLOT(setShowLogs(bool)));
|
||||
m_showDebugButton->setDefaultAction(m_showDebugButtonAction);
|
||||
|
||||
@@ -120,7 +121,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
|
||||
m_showWarningButtonAction->setSettingsKey(QLatin1String(CONSOLE), QLatin1String(SHOW_WARNING));
|
||||
m_showWarningButtonAction->setToolTip(tr("Show debug, log, and info messages."));
|
||||
m_showWarningButtonAction->setCheckable(true);
|
||||
m_showWarningButtonAction->setIcon(QIcon(QLatin1String(":/qmljstools/images/warning.png")));
|
||||
m_showWarningButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_WARNING)));
|
||||
connect(m_showWarningButtonAction, SIGNAL(toggled(bool)), m_proxyModel,
|
||||
SLOT(setShowWarnings(bool)));
|
||||
m_showWarningButton->setDefaultAction(m_showWarningButtonAction);
|
||||
@@ -133,7 +134,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
|
||||
m_showErrorButtonAction->setSettingsKey(QLatin1String(CONSOLE), QLatin1String(SHOW_ERROR));
|
||||
m_showErrorButtonAction->setToolTip(tr("Show debug, log, and info messages."));
|
||||
m_showErrorButtonAction->setCheckable(true);
|
||||
m_showErrorButtonAction->setIcon(QIcon(QLatin1String(":/qmljstools/images/error.png")));
|
||||
m_showErrorButtonAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_ERROR)));
|
||||
connect(m_showErrorButtonAction, SIGNAL(toggled(bool)), m_proxyModel,
|
||||
SLOT(setShowErrors(bool)));
|
||||
m_showErrorButton->setDefaultAction(m_showErrorButtonAction);
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
<file>images/category_qml.png</file>
|
||||
<file>images/prompt.png</file>
|
||||
<file>images/collapse.png</file>
|
||||
<file>images/warning.png</file>
|
||||
<file>images/log.png</file>
|
||||
<file>images/expand.png</file>
|
||||
<file>images/error.png</file>
|
||||
<file>QmlJSTools.mimetypes.xml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Reference in New Issue
Block a user