mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
View
- Converted 'help' and 'stats' reports to use ViewText. - Modified Column.cpp to omit column headers if blank.
This commit is contained in:
parent
1a833af2a4
commit
fcb711d673
3 changed files with 243 additions and 271 deletions
|
@ -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, '-')));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue