Enhancement - color.alternate

- The 'stats' and 'info' reports now obey color.alternate.
This commit is contained in:
Paul Beckingham 2010-07-23 22:31:38 -07:00
parent 30cb5fa4f4
commit 5cecc3d772
2 changed files with 17 additions and 0 deletions

View file

@ -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 ();