forked from qt-creator/qt-creator
Core: Better warning/error/info icons on non-toolbars
The warning/error/info with shadow and transparent mark work well on our toolbars but not anywhere else. This patch creates a separate set of these icons with better contrast, filled marks and no shadow. Change-Id: I96787753dffd80b325336f0adc8e3be054c34618 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -50,9 +50,12 @@ FancyToolButtonSelectedColor=selectedBackground
|
||||
FutureProgressBackgroundColor=shadowBackground
|
||||
IconsBaseColor=ffdcdcdc
|
||||
IconsDisabledColor=textDisabled
|
||||
IconsInfoColor=ff43aced
|
||||
IconsWarningColor=fff9ce1f
|
||||
IconsErrorColor=ffe8555a
|
||||
IconsInfoColor=ff3099dc
|
||||
IconsInfoToolBarColor=ff3099dc
|
||||
IconsWarningColor=ffe0b716
|
||||
IconsWarningToolBarColor=ffe0b716
|
||||
IconsErrorColor=ffd84044
|
||||
IconsErrorToolBarColor=ffd84044
|
||||
IconsRunColor=ff7fc341
|
||||
IconsStopColor=ffe7353b
|
||||
IconsDebugColor=ffb8c6ff
|
||||
|
||||
@@ -45,9 +45,12 @@ FancyToolButtonSelectedColor=32000000
|
||||
FutureProgressBackgroundColor=ffff0000
|
||||
IconsBaseColor=ffdcdcdc
|
||||
IconsDisabledColor=textDisabled
|
||||
IconsInfoColor=ff43aced
|
||||
IconsWarningColor=fff9ce1f
|
||||
IconsErrorColor=ffe8555a
|
||||
IconsInfoColor=ff3099dc
|
||||
IconsInfoToolBarColor=ff43aced
|
||||
IconsWarningColor=ffecbc1c
|
||||
IconsWarningToolBarColor=fff9ce1f
|
||||
IconsErrorColor=ffdf4f4f
|
||||
IconsErrorToolBarColor=ffe8555a
|
||||
IconsRunColor=ff7fc341
|
||||
IconsStopColor=ffe7353b
|
||||
IconsDebugColor=ffb8c6ff
|
||||
|
||||
@@ -118,7 +118,7 @@ static QPixmap masksToIcon(const MasksAndColors &masks, const QPixmap &combinedM
|
||||
|
||||
for (MasksAndColors::const_iterator maskImage = masks.constBegin();
|
||||
maskImage != masks.constEnd(); ++maskImage) {
|
||||
if (maskImage != masks.constBegin()) {
|
||||
if (style == Icon::Style::TintedWithShadow && maskImage != masks.constBegin()) {
|
||||
// Punch a transparent outline around an overlay.
|
||||
p.save();
|
||||
p.setOpacity(0.4);
|
||||
|
||||
@@ -136,8 +136,11 @@ public:
|
||||
IconsBaseColor,
|
||||
IconsDisabledColor,
|
||||
IconsInfoColor,
|
||||
IconsInfoToolBarColor,
|
||||
IconsWarningColor,
|
||||
IconsWarningToolBarColor,
|
||||
IconsErrorColor,
|
||||
IconsErrorToolBarColor,
|
||||
IconsRunColor,
|
||||
IconsStopColor,
|
||||
IconsInterruptColor,
|
||||
|
||||
@@ -96,6 +96,8 @@
|
||||
<file>images/warning@2x.png</file>
|
||||
<file>images/info.png</file>
|
||||
<file>images/info@2x.png</file>
|
||||
<file>images/warningfill.png</file>
|
||||
<file>images/warningfill@2x.png</file>
|
||||
<file>images/dark_fileicon.png</file>
|
||||
<file>images/dark_foldericon.png</file>
|
||||
<file>images/Desktop.png</file>
|
||||
|
||||
@@ -120,11 +120,20 @@ const Utils::Icon FILTER({
|
||||
const Utils::Icon LINK({
|
||||
{QLatin1String(":/core/images/linkicon.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon WARNING({
|
||||
{QLatin1String(":/core/images/warning.png"), Utils::Theme::IconsWarningColor}});
|
||||
{QLatin1String(":/core/images/warningfill.png"), Utils::Theme::BackgroundColorNormal},
|
||||
{QLatin1String(":/core/images/warning.png"), Utils::Theme::IconsWarningColor}}, Utils::Icon::Style::Tinted);
|
||||
const Utils::Icon WARNING_TOOLBAR({
|
||||
{QLatin1String(":/core/images/warning.png"), Utils::Theme::IconsWarningToolBarColor}});
|
||||
const Utils::Icon ERROR({
|
||||
{QLatin1String(":/core/images/error.png"), Utils::Theme::IconsErrorColor}});
|
||||
{QLatin1String(":/core/images/warningfill.png"), Utils::Theme::BackgroundColorNormal},
|
||||
{QLatin1String(":/core/images/error.png"), Utils::Theme::IconsErrorColor}}, Utils::Icon::Style::Tinted);
|
||||
const Utils::Icon ERROR_TOOLBAR({
|
||||
{QLatin1String(":/core/images/error.png"), Utils::Theme::IconsErrorToolBarColor}});
|
||||
const Utils::Icon INFO({
|
||||
{QLatin1String(":/core/images/info.png"), Utils::Theme::IconsInfoColor}});
|
||||
{QLatin1String(":/core/images/warningfill.png"), Utils::Theme::BackgroundColorNormal},
|
||||
{QLatin1String(":/core/images/info.png"), Utils::Theme::IconsInfoColor}}, Utils::Icon::Style::Tinted);
|
||||
const Utils::Icon INFO_TOOLBAR({
|
||||
{QLatin1String(":/core/images/info.png"), Utils::Theme::IconsInfoToolBarColor}});
|
||||
const Utils::Icon EXPAND({
|
||||
{QLatin1String(":/find/images/expand.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon DEBUG_START_SMALL({
|
||||
|
||||
BIN
src/plugins/coreplugin/images/warningfill.png
Normal file
BIN
src/plugins/coreplugin/images/warningfill.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 94 B |
BIN
src/plugins/coreplugin/images/warningfill@2x.png
Normal file
BIN
src/plugins/coreplugin/images/warningfill@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 96 B |
@@ -87,8 +87,8 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation
|
||||
|
||||
m_errorIcon->setAlignment(Qt::AlignRight);
|
||||
m_warningIcon->setAlignment(Qt::AlignRight);
|
||||
m_errorIcon->setPixmap(Core::Icons::ERROR.pixmap());
|
||||
m_warningIcon->setPixmap(Core::Icons::WARNING.pixmap());
|
||||
m_errorIcon->setPixmap(Core::Icons::ERROR_TOOLBAR.pixmap());
|
||||
m_warningIcon->setPixmap(Core::Icons::WARNING_TOOLBAR.pixmap());
|
||||
|
||||
m_contentWidget->hide();
|
||||
|
||||
|
||||
@@ -101,8 +101,6 @@ void TaskMark::clicked()
|
||||
}
|
||||
|
||||
TaskHub::TaskHub()
|
||||
: m_errorIcon(Core::Icons::ERROR.icon()),
|
||||
m_warningIcon(Core::Icons::WARNING.icon())
|
||||
{
|
||||
m_instance = this;
|
||||
qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task");
|
||||
|
||||
@@ -83,9 +83,6 @@ private:
|
||||
TaskHub();
|
||||
~TaskHub();
|
||||
|
||||
const QIcon m_errorIcon;
|
||||
const QIcon m_warningIcon;
|
||||
|
||||
static QVector<Core::Id> m_registeredCategories;
|
||||
|
||||
friend class ProjectExplorerPlugin;
|
||||
|
||||
@@ -265,7 +265,7 @@ TaskWindow::TaskWindow() : d(new TaskWindowPrivate)
|
||||
d->m_listview->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
d->m_filterWarningsButton = createFilterButton(
|
||||
Core::Icons::WARNING.icon(),
|
||||
Core::Icons::WARNING_TOOLBAR.icon(),
|
||||
tr("Show Warnings"), this, [this](bool show) { setShowWarnings(show); });
|
||||
|
||||
d->m_categoriesButton = new QToolButton;
|
||||
|
||||
@@ -113,7 +113,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
|
||||
m_showDebugButtonAction->setToolTip(tr("Show debug, log, and info messages."));
|
||||
m_showDebugButtonAction->setCheckable(true);
|
||||
m_showDebugButtonAction->setChecked(true);
|
||||
m_showDebugButtonAction->setIcon(Core::Icons::INFO.icon());
|
||||
m_showDebugButtonAction->setIcon(Core::Icons::INFO_TOOLBAR.icon());
|
||||
connect(m_showDebugButtonAction, &Utils::SavedAction::toggled,
|
||||
m_proxyModel, &QmlConsoleProxyModel::setShowLogs);
|
||||
m_showDebugButton->setDefaultAction(m_showDebugButtonAction);
|
||||
@@ -127,7 +127,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
|
||||
m_showWarningButtonAction->setToolTip(tr("Show warning messages."));
|
||||
m_showWarningButtonAction->setCheckable(true);
|
||||
m_showWarningButtonAction->setChecked(true);
|
||||
m_showWarningButtonAction->setIcon(Core::Icons::WARNING.icon());
|
||||
m_showWarningButtonAction->setIcon(Core::Icons::WARNING_TOOLBAR.icon());
|
||||
connect(m_showWarningButtonAction, &Utils::SavedAction::toggled,
|
||||
m_proxyModel, &QmlConsoleProxyModel::setShowWarnings);
|
||||
m_showWarningButton->setDefaultAction(m_showWarningButtonAction);
|
||||
@@ -141,7 +141,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
|
||||
m_showErrorButtonAction->setToolTip(tr("Show error messages."));
|
||||
m_showErrorButtonAction->setCheckable(true);
|
||||
m_showErrorButtonAction->setChecked(true);
|
||||
m_showErrorButtonAction->setIcon(Core::Icons::ERROR.icon());
|
||||
m_showErrorButtonAction->setIcon(Core::Icons::ERROR_TOOLBAR.icon());
|
||||
connect(m_showErrorButtonAction, &Utils::SavedAction::toggled, m_proxyModel, &QmlConsoleProxyModel::setShowErrors);
|
||||
m_showErrorButton->setDefaultAction(m_showErrorButtonAction);
|
||||
|
||||
|
||||
@@ -3032,6 +3032,23 @@
|
||||
inkscape:connector-curvature="0"
|
||||
style="display:inline;fill:#000000" />
|
||||
</g>
|
||||
<g
|
||||
id="src/plugins/coreplugin/images/warningfill">
|
||||
<rect
|
||||
y="520"
|
||||
x="16"
|
||||
height="16"
|
||||
width="16"
|
||||
id="use3942-3"
|
||||
style="display:inline;fill:#ffffff;stroke:none" />
|
||||
<rect
|
||||
y="524"
|
||||
x="23"
|
||||
height="9"
|
||||
width="2"
|
||||
id="rect4768"
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
id="src/plugins/coreplugin/images/warning_big"
|
||||
transform="translate(-438,-48)">
|
||||
|
||||
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 129 KiB |
Reference in New Issue
Block a user