- Converted 'help' and 'stats' reports to use ViewText.
- Modified Column.cpp to omit column headers if blank.
This commit is contained in:
Paul Beckingham 2011-05-10 23:46:47 -04:00
parent 1a833af2a4
commit fcb711d673
3 changed files with 243 additions and 271 deletions

View file

@ -147,24 +147,27 @@ void Column::renderHeader (
int width,
Color& color)
{
// Create a basic label.
std::string header;
header.reserve (width);
header = _label;
// Create a fungible copy.
Color c = color;
// Now underline the header, or add a dashed line.
if (context.config.getBoolean ("fontunderline"))
if (_label != "")
{
c.blend (Color (Color::nocolor, Color::nocolor, true, false, false));
lines.push_back (c.colorize (leftJustify (header, width)));
}
else
{
lines.push_back (c.colorize (leftJustify (header, width)));
lines.push_back (c.colorize (std::string (width, '-')));
// Create a basic label.
std::string header;
header.reserve (width);
header = _label;
// Create a fungible copy.
Color c = color;
// Now underline the header, or add a dashed line.
if (context.config.getBoolean ("fontunderline"))
{
c.blend (Color (Color::nocolor, Color::nocolor, true, false, false));
lines.push_back (c.colorize (leftJustify (header, width)));
}
else
{
lines.push_back (c.colorize (leftJustify (header, width)));
lines.push_back (c.colorize (std::string (width, '-')));
}
}
}