Enhancement - color.alternate
- The 'stats' and 'info' reports now obey color.alternate.
This commit is contained in:
@@ -609,6 +609,14 @@ int handleInfo (std::string &outs)
|
||||
table.addCell (row, 1, color);
|
||||
}
|
||||
|
||||
// If an alternating row color is specified, notify the table.
|
||||
if (context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor"))
|
||||
{
|
||||
Color alternate (context.config.get ("color.alternate"));
|
||||
if (alternate.nontrivial ())
|
||||
table.setTableAlternateColor (alternate);
|
||||
}
|
||||
|
||||
out << optionalBlankLine ()
|
||||
<< table.render ()
|
||||
<< std::endl;
|
||||
@@ -2506,6 +2514,14 @@ int handleReportStats (std::string &outs)
|
||||
table.addCell (row, 1, value.str ());
|
||||
}
|
||||
|
||||
// If an alternating row color is specified, notify the table.
|
||||
if (context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor"))
|
||||
{
|
||||
Color alternate (context.config.get ("color.alternate"));
|
||||
if (alternate.nontrivial ())
|
||||
table.setTableAlternateColor (alternate);
|
||||
}
|
||||
|
||||
out << optionalBlankLine ()
|
||||
<< table.render ()
|
||||
<< optionalBlankLine ();
|
||||
|
||||
Reference in New Issue
Block a user