From 919e3c7261fd43a0e1b00f255378b3607a54cca1 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 30 Mar 2015 10:47:48 +0300 Subject: [PATCH] Theming: Unify some duplicate color roles Change-Id: Ic000abd9bd9381e20126d0ce56ce68a35a07efe2 Reviewed-by: Eike Ziller --- share/qtcreator/themes/dark.creatortheme | 18 +++++++--------- share/qtcreator/themes/default.creatortheme | 18 +++++++--------- src/libs/utils/outputformatter.cpp | 10 ++++----- src/libs/utils/theme/theme.h | 21 +++++++------------ src/plugins/debugger/logwindow.cpp | 4 ++-- .../projectexplorer/compileoutputwindow.cpp | 6 +++--- 6 files changed, 32 insertions(+), 45 deletions(-) diff --git a/share/qtcreator/themes/dark.creatortheme b/share/qtcreator/themes/dark.creatortheme index 346b0d2658c..1e08b46aba4 100644 --- a/share/qtcreator/themes/dark.creatortheme +++ b/share/qtcreator/themes/dark.creatortheme @@ -77,24 +77,20 @@ ToolBarBackgroundColor=shadowBackground TreeViewArrowColorNormal=hoverBackground TreeViewArrowColorSelected=text -OutputFormatter_DebugTextColor=text -OutputFormatter_ErrorMessageTextColor=error -OutputFormatter_NormalMessageTextColor=text -OutputFormatter_StdErrTextColor=error -OutputFormatter_StdOutTextColor=text +OutputPanes_DebugTextColor=text +OutputPanes_ErrorMessageTextColor=ffff6c6c +OutputPanes_MessageOutput=ff008787 +OutputPanes_NormalMessageTextColor=text +OutputPanes_StdErrTextColor=error +OutputPanes_StdOutTextColor=text +OutputPanes_WarningMessageTextColor=fff3c300 OutputPaneButtonFlashColor=error OutputPaneToggleButtonTextColorChecked=text OutputPaneToggleButtonTextColorUnchecked=text QtOutputFormatter_LinkTextColor=ff0000ff -CompileOutput_ErrorOutput=ffff6c6c -CompileOutput_MessageOutput=ff008787 -CompileOutput_ErrorMessageOutput=ffff6c6c - Debugger_LogWindow_LogInput=ff00acac Debugger_LogWindow_LogStatus=ff00875a -Debugger_LogWindow_LogWarning=fff3c300 -Debugger_LogWindow_LogError=ffff6c6c Debugger_LogWindow_LogTime=ffbf0303 Debugger_WatchItem_ValueNormal=text diff --git a/share/qtcreator/themes/default.creatortheme b/share/qtcreator/themes/default.creatortheme index 6a578b72a27..914611c2516 100644 --- a/share/qtcreator/themes/default.creatortheme +++ b/share/qtcreator/themes/default.creatortheme @@ -71,24 +71,20 @@ ToolBarBackgroundColor=ffff0000 TreeViewArrowColorNormal=ffff0000 TreeViewArrowColorSelected=ffff0000 -OutputFormatter_DebugTextColor=ffaa00aa -OutputFormatter_ErrorMessageTextColor=ffaa0000 -OutputFormatter_NormalMessageTextColor=ff0000aa -OutputFormatter_StdErrTextColor=ffaa0000 -OutputFormatter_StdOutTextColor=ff000000 +OutputPanes_DebugTextColor=ffaa00aa +OutputPanes_ErrorMessageTextColor=ffaa0000 +OutputPanes_MessageOutput=ff0000aa +OutputPanes_NormalMessageTextColor=ff0000aa +OutputPanes_StdErrTextColor=ffaa0000 +OutputPanes_StdOutTextColor=ff000000 +OutputPanes_WarningMessageTextColor=ff808000 OutputPaneButtonFlashColor=ffff0000 OutputPaneToggleButtonTextColorChecked=ffffffff OutputPaneToggleButtonTextColorUnchecked=ff000000 QtOutputFormatter_LinkTextColor=ff0000aa -CompileOutput_ErrorOutput=ffaa0000 -CompileOutput_MessageOutput=ff0000aa -CompileOutput_ErrorMessageOutput=ffaa0000 - Debugger_LogWindow_LogInput=ff0000ff Debugger_LogWindow_LogStatus=ff008000 -Debugger_LogWindow_LogWarning=ff808000 -Debugger_LogWindow_LogError=ffff0000 Debugger_LogWindow_LogTime=ff800000 Debugger_WatchItem_ValueNormal=ff000000 diff --git a/src/libs/utils/outputformatter.cpp b/src/libs/utils/outputformatter.cpp index d9a70f3040e..aa4c222e088 100644 --- a/src/libs/utils/outputformatter.cpp +++ b/src/libs/utils/outputformatter.cpp @@ -142,24 +142,24 @@ void OutputFormatter::initFormats() // NormalMessageFormat d->formats[NormalMessageFormat].setFont(boldFont); - d->formats[NormalMessageFormat].setForeground(theme->color(Theme::OutputFormatter_NormalMessageTextColor)); + d->formats[NormalMessageFormat].setForeground(theme->color(Theme::OutputPanes_NormalMessageTextColor)); // ErrorMessageFormat d->formats[ErrorMessageFormat].setFont(boldFont); - d->formats[ErrorMessageFormat].setForeground(theme->color(Theme::OutputFormatter_ErrorMessageTextColor)); + d->formats[ErrorMessageFormat].setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor)); // StdOutFormat d->formats[StdOutFormat].setFont(d->font); - d->formats[StdOutFormat].setForeground(theme->color(Theme::OutputFormatter_StdOutTextColor)); + d->formats[StdOutFormat].setForeground(theme->color(Theme::OutputPanes_StdOutTextColor)); d->formats[StdOutFormatSameLine] = d->formats[StdOutFormat]; // StdErrFormat d->formats[StdErrFormat].setFont(d->font); - d->formats[StdErrFormat].setForeground(theme->color(Theme::OutputFormatter_StdErrTextColor)); + d->formats[StdErrFormat].setForeground(theme->color(Theme::OutputPanes_StdErrTextColor)); d->formats[StdErrFormatSameLine] = d->formats[StdErrFormat]; d->formats[DebugFormat].setFont(d->font); - d->formats[DebugFormat].setForeground(theme->color(Theme::OutputFormatter_DebugTextColor)); + d->formats[DebugFormat].setForeground(theme->color(Theme::OutputPanes_DebugTextColor)); } void OutputFormatter::handleLink(const QString &href) diff --git a/src/libs/utils/theme/theme.h b/src/libs/utils/theme/theme.h index 5ba8771d5f7..90efa37528a 100644 --- a/src/libs/utils/theme/theme.h +++ b/src/libs/utils/theme/theme.h @@ -125,26 +125,21 @@ public: TreeViewArrowColorNormal, TreeViewArrowColorSelected, - OutputFormatter_NormalMessageTextColor, - OutputFormatter_ErrorMessageTextColor, - OutputFormatter_StdOutTextColor, - OutputFormatter_StdErrTextColor, - OutputFormatter_DebugTextColor, + /* Output panes */ + OutputPanes_DebugTextColor, + OutputPanes_ErrorMessageTextColor, + OutputPanes_MessageOutput, + OutputPanes_NormalMessageTextColor, + OutputPanes_StdErrTextColor, + OutputPanes_StdOutTextColor, + OutputPanes_WarningMessageTextColor, QtOutputFormatter_LinkTextColor, - /* Compile Output Pane */ - - CompileOutput_ErrorOutput, - CompileOutput_MessageOutput, - CompileOutput_ErrorMessageOutput, - /* Debugger Log Window */ Debugger_LogWindow_LogInput, Debugger_LogWindow_LogStatus, - Debugger_LogWindow_LogWarning, - Debugger_LogWindow_LogError, Debugger_LogWindow_LogTime, /* Debugger Watch Item */ diff --git a/src/plugins/debugger/logwindow.cpp b/src/plugins/debugger/logwindow.cpp index e1cec0f67f6..4d0c76fde7a 100644 --- a/src/plugins/debugger/logwindow.cpp +++ b/src/plugins/debugger/logwindow.cpp @@ -88,11 +88,11 @@ private: setFormat(1, text.size(), format); break; case LogWarning: - format.setForeground(theme->color(Theme::Debugger_LogWindow_LogWarning)); + format.setForeground(theme->color(Theme::OutputPanes_WarningMessageTextColor)); setFormat(1, text.size(), format); break; case LogError: - format.setForeground(theme->color(Theme::Debugger_LogWindow_LogError)); + format.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor)); setFormat(1, text.size(), format); break; case LogTime: diff --git a/src/plugins/projectexplorer/compileoutputwindow.cpp b/src/plugins/projectexplorer/compileoutputwindow.cpp index 1ddf2d8d5cf..c20f813a617 100644 --- a/src/plugins/projectexplorer/compileoutputwindow.cpp +++ b/src/plugins/projectexplorer/compileoutputwindow.cpp @@ -197,14 +197,14 @@ void CompileOutputWindow::appendText(const QString &text, BuildStep::OutputForma textFormat.setFontWeight(QFont::Normal); break; case BuildStep::ErrorOutput: - textFormat.setForeground(theme->color(Theme::CompileOutput_ErrorOutput)); + textFormat.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor)); textFormat.setFontWeight(QFont::Normal); break; case BuildStep::MessageOutput: - textFormat.setForeground(theme->color(Theme::CompileOutput_MessageOutput)); + textFormat.setForeground(theme->color(Theme::OutputPanes_MessageOutput)); break; case BuildStep::ErrorMessageOutput: - textFormat.setForeground(theme->color(Theme::CompileOutput_ErrorMessageOutput)); + textFormat.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor)); textFormat.setFontWeight(QFont::Bold); break;