diff --git a/share/qtcreator/themes/dark.creatortheme b/share/qtcreator/themes/dark.creatortheme index 21f057f88e2..3d972cbb243 100644 --- a/share/qtcreator/themes/dark.creatortheme +++ b/share/qtcreator/themes/dark.creatortheme @@ -87,6 +87,10 @@ OutputPaneToggleButtonTextColorChecked=text OutputPaneToggleButtonTextColorUnchecked=text QtOutputFormatter_LinkTextColor=ff0000ff +CompileOutput_ErrorOutput=ffff6c6c +CompileOutput_MessageOutput=ff008787 +CompileOutput_ErrorMessageOutput=ffff6c6c + Welcome_BackgroundColorNormal=normalBackground Welcome_Button_BorderColorNormal=0 Welcome_Button_BorderColorPressed=0 diff --git a/share/qtcreator/themes/default.creatortheme b/share/qtcreator/themes/default.creatortheme index 2f17c1b9095..6927484ce5b 100644 --- a/share/qtcreator/themes/default.creatortheme +++ b/share/qtcreator/themes/default.creatortheme @@ -81,6 +81,10 @@ OutputPaneToggleButtonTextColorChecked=ffffffff OutputPaneToggleButtonTextColorUnchecked=ff000000 QtOutputFormatter_LinkTextColor=ff0000aa +CompileOutput_ErrorOutput=ffaa0000 +CompileOutput_MessageOutput=ff0000aa +CompileOutput_ErrorMessageOutput=ffaa0000 + Welcome_BackgroundColorNormal=ffffffff Welcome_Button_BorderColorNormal=ff737373 Welcome_Button_BorderColorPressed=ff333333 diff --git a/src/libs/utils/theme/theme.h b/src/libs/utils/theme/theme.h index 4f63f28c963..167052e1152 100644 --- a/src/libs/utils/theme/theme.h +++ b/src/libs/utils/theme/theme.h @@ -133,6 +133,12 @@ public: QtOutputFormatter_LinkTextColor, + /* Compile Output Pane */ + + CompileOutput_ErrorOutput, + CompileOutput_MessageOutput, + CompileOutput_ErrorMessageOutput, + /* Welcome Plugin */ Welcome_TextColorNormal, diff --git a/src/plugins/projectexplorer/compileoutputwindow.cpp b/src/plugins/projectexplorer/compileoutputwindow.cpp index 707bc15fb47..1ddf2d8d5cf 100644 --- a/src/plugins/projectexplorer/compileoutputwindow.cpp +++ b/src/plugins/projectexplorer/compileoutputwindow.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -184,30 +185,26 @@ QList CompileOutputWindow::toolBarWidgets() const return QList() << m_cancelBuildButton; } -static QColor mix_colors(const QColor &a, const QColor &b) -{ - return QColor((a.red() + 2 * b.red()) / 3, (a.green() + 2 * b.green()) / 3, - (a.blue() + 2* b.blue()) / 3, (a.alpha() + 2 * b.alpha()) / 3); -} - void CompileOutputWindow::appendText(const QString &text, BuildStep::OutputFormat format) { + using Utils::Theme; QPalette p = m_outputWindow->palette(); + Theme *theme = Utils::creatorTheme(); QTextCharFormat textFormat; switch (format) { case BuildStep::NormalOutput: - textFormat.setForeground(p.color(QPalette::Text)); + textFormat.setForeground(theme->color(Theme::TextColorNormal)); textFormat.setFontWeight(QFont::Normal); break; case BuildStep::ErrorOutput: - textFormat.setForeground(mix_colors(p.color(QPalette::Text), QColor(Qt::red))); + textFormat.setForeground(theme->color(Theme::CompileOutput_ErrorOutput)); textFormat.setFontWeight(QFont::Normal); break; case BuildStep::MessageOutput: - textFormat.setForeground(mix_colors(p.color(QPalette::Text), QColor(Qt::blue))); + textFormat.setForeground(theme->color(Theme::CompileOutput_MessageOutput)); break; case BuildStep::ErrorMessageOutput: - textFormat.setForeground(mix_colors(p.color(QPalette::Text), QColor(Qt::red))); + textFormat.setForeground(theme->color(Theme::CompileOutput_ErrorMessageOutput)); textFormat.setFontWeight(QFont::Bold); break;