Theming: Unify some duplicate color roles

Change-Id: Ic000abd9bd9381e20126d0ce56ce68a35a07efe2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-03-30 10:47:48 +03:00
committed by Orgad Shaneh
parent e623de1ede
commit 919e3c7261
6 changed files with 32 additions and 45 deletions

View File

@@ -77,24 +77,20 @@ ToolBarBackgroundColor=shadowBackground
TreeViewArrowColorNormal=hoverBackground TreeViewArrowColorNormal=hoverBackground
TreeViewArrowColorSelected=text TreeViewArrowColorSelected=text
OutputFormatter_DebugTextColor=text OutputPanes_DebugTextColor=text
OutputFormatter_ErrorMessageTextColor=error OutputPanes_ErrorMessageTextColor=ffff6c6c
OutputFormatter_NormalMessageTextColor=text OutputPanes_MessageOutput=ff008787
OutputFormatter_StdErrTextColor=error OutputPanes_NormalMessageTextColor=text
OutputFormatter_StdOutTextColor=text OutputPanes_StdErrTextColor=error
OutputPanes_StdOutTextColor=text
OutputPanes_WarningMessageTextColor=fff3c300
OutputPaneButtonFlashColor=error OutputPaneButtonFlashColor=error
OutputPaneToggleButtonTextColorChecked=text OutputPaneToggleButtonTextColorChecked=text
OutputPaneToggleButtonTextColorUnchecked=text OutputPaneToggleButtonTextColorUnchecked=text
QtOutputFormatter_LinkTextColor=ff0000ff QtOutputFormatter_LinkTextColor=ff0000ff
CompileOutput_ErrorOutput=ffff6c6c
CompileOutput_MessageOutput=ff008787
CompileOutput_ErrorMessageOutput=ffff6c6c
Debugger_LogWindow_LogInput=ff00acac Debugger_LogWindow_LogInput=ff00acac
Debugger_LogWindow_LogStatus=ff00875a Debugger_LogWindow_LogStatus=ff00875a
Debugger_LogWindow_LogWarning=fff3c300
Debugger_LogWindow_LogError=ffff6c6c
Debugger_LogWindow_LogTime=ffbf0303 Debugger_LogWindow_LogTime=ffbf0303
Debugger_WatchItem_ValueNormal=text Debugger_WatchItem_ValueNormal=text

View File

@@ -71,24 +71,20 @@ ToolBarBackgroundColor=ffff0000
TreeViewArrowColorNormal=ffff0000 TreeViewArrowColorNormal=ffff0000
TreeViewArrowColorSelected=ffff0000 TreeViewArrowColorSelected=ffff0000
OutputFormatter_DebugTextColor=ffaa00aa OutputPanes_DebugTextColor=ffaa00aa
OutputFormatter_ErrorMessageTextColor=ffaa0000 OutputPanes_ErrorMessageTextColor=ffaa0000
OutputFormatter_NormalMessageTextColor=ff0000aa OutputPanes_MessageOutput=ff0000aa
OutputFormatter_StdErrTextColor=ffaa0000 OutputPanes_NormalMessageTextColor=ff0000aa
OutputFormatter_StdOutTextColor=ff000000 OutputPanes_StdErrTextColor=ffaa0000
OutputPanes_StdOutTextColor=ff000000
OutputPanes_WarningMessageTextColor=ff808000
OutputPaneButtonFlashColor=ffff0000 OutputPaneButtonFlashColor=ffff0000
OutputPaneToggleButtonTextColorChecked=ffffffff OutputPaneToggleButtonTextColorChecked=ffffffff
OutputPaneToggleButtonTextColorUnchecked=ff000000 OutputPaneToggleButtonTextColorUnchecked=ff000000
QtOutputFormatter_LinkTextColor=ff0000aa QtOutputFormatter_LinkTextColor=ff0000aa
CompileOutput_ErrorOutput=ffaa0000
CompileOutput_MessageOutput=ff0000aa
CompileOutput_ErrorMessageOutput=ffaa0000
Debugger_LogWindow_LogInput=ff0000ff Debugger_LogWindow_LogInput=ff0000ff
Debugger_LogWindow_LogStatus=ff008000 Debugger_LogWindow_LogStatus=ff008000
Debugger_LogWindow_LogWarning=ff808000
Debugger_LogWindow_LogError=ffff0000
Debugger_LogWindow_LogTime=ff800000 Debugger_LogWindow_LogTime=ff800000
Debugger_WatchItem_ValueNormal=ff000000 Debugger_WatchItem_ValueNormal=ff000000

View File

@@ -142,24 +142,24 @@ void OutputFormatter::initFormats()
// NormalMessageFormat // NormalMessageFormat
d->formats[NormalMessageFormat].setFont(boldFont); d->formats[NormalMessageFormat].setFont(boldFont);
d->formats[NormalMessageFormat].setForeground(theme->color(Theme::OutputFormatter_NormalMessageTextColor)); d->formats[NormalMessageFormat].setForeground(theme->color(Theme::OutputPanes_NormalMessageTextColor));
// ErrorMessageFormat // ErrorMessageFormat
d->formats[ErrorMessageFormat].setFont(boldFont); d->formats[ErrorMessageFormat].setFont(boldFont);
d->formats[ErrorMessageFormat].setForeground(theme->color(Theme::OutputFormatter_ErrorMessageTextColor)); d->formats[ErrorMessageFormat].setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
// StdOutFormat // StdOutFormat
d->formats[StdOutFormat].setFont(d->font); 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]; d->formats[StdOutFormatSameLine] = d->formats[StdOutFormat];
// StdErrFormat // StdErrFormat
d->formats[StdErrFormat].setFont(d->font); 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[StdErrFormatSameLine] = d->formats[StdErrFormat];
d->formats[DebugFormat].setFont(d->font); 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) void OutputFormatter::handleLink(const QString &href)

View File

@@ -125,26 +125,21 @@ public:
TreeViewArrowColorNormal, TreeViewArrowColorNormal,
TreeViewArrowColorSelected, TreeViewArrowColorSelected,
OutputFormatter_NormalMessageTextColor, /* Output panes */
OutputFormatter_ErrorMessageTextColor,
OutputFormatter_StdOutTextColor,
OutputFormatter_StdErrTextColor,
OutputFormatter_DebugTextColor,
OutputPanes_DebugTextColor,
OutputPanes_ErrorMessageTextColor,
OutputPanes_MessageOutput,
OutputPanes_NormalMessageTextColor,
OutputPanes_StdErrTextColor,
OutputPanes_StdOutTextColor,
OutputPanes_WarningMessageTextColor,
QtOutputFormatter_LinkTextColor, QtOutputFormatter_LinkTextColor,
/* Compile Output Pane */
CompileOutput_ErrorOutput,
CompileOutput_MessageOutput,
CompileOutput_ErrorMessageOutput,
/* Debugger Log Window */ /* Debugger Log Window */
Debugger_LogWindow_LogInput, Debugger_LogWindow_LogInput,
Debugger_LogWindow_LogStatus, Debugger_LogWindow_LogStatus,
Debugger_LogWindow_LogWarning,
Debugger_LogWindow_LogError,
Debugger_LogWindow_LogTime, Debugger_LogWindow_LogTime,
/* Debugger Watch Item */ /* Debugger Watch Item */

View File

@@ -88,11 +88,11 @@ private:
setFormat(1, text.size(), format); setFormat(1, text.size(), format);
break; break;
case LogWarning: case LogWarning:
format.setForeground(theme->color(Theme::Debugger_LogWindow_LogWarning)); format.setForeground(theme->color(Theme::OutputPanes_WarningMessageTextColor));
setFormat(1, text.size(), format); setFormat(1, text.size(), format);
break; break;
case LogError: case LogError:
format.setForeground(theme->color(Theme::Debugger_LogWindow_LogError)); format.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
setFormat(1, text.size(), format); setFormat(1, text.size(), format);
break; break;
case LogTime: case LogTime:

View File

@@ -197,14 +197,14 @@ void CompileOutputWindow::appendText(const QString &text, BuildStep::OutputForma
textFormat.setFontWeight(QFont::Normal); textFormat.setFontWeight(QFont::Normal);
break; break;
case BuildStep::ErrorOutput: case BuildStep::ErrorOutput:
textFormat.setForeground(theme->color(Theme::CompileOutput_ErrorOutput)); textFormat.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
textFormat.setFontWeight(QFont::Normal); textFormat.setFontWeight(QFont::Normal);
break; break;
case BuildStep::MessageOutput: case BuildStep::MessageOutput:
textFormat.setForeground(theme->color(Theme::CompileOutput_MessageOutput)); textFormat.setForeground(theme->color(Theme::OutputPanes_MessageOutput));
break; break;
case BuildStep::ErrorMessageOutput: case BuildStep::ErrorMessageOutput:
textFormat.setForeground(theme->color(Theme::CompileOutput_ErrorMessageOutput)); textFormat.setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor));
textFormat.setFontWeight(QFont::Bold); textFormat.setFontWeight(QFont::Bold);
break; break;