mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CmdInfo: Table headers consistent
This commit is contained in:
parent
c8fb2f1ddd
commit
043884fc9b
1 changed files with 3 additions and 81 deletions
|
@ -107,35 +107,7 @@ int CmdInfo::execute (std::string& output)
|
||||||
view.forceColor ();
|
view.forceColor ();
|
||||||
view.add (STRING_COLUMN_LABEL_NAME);
|
view.add (STRING_COLUMN_LABEL_NAME);
|
||||||
view.add (STRING_COLUMN_LABEL_VALUE);
|
view.add (STRING_COLUMN_LABEL_VALUE);
|
||||||
|
setHeaderUnderline (view);
|
||||||
// If an alternating row color is specified, notify the table.
|
|
||||||
if (context.color ())
|
|
||||||
{
|
|
||||||
Color alternate (context.config.get ("color.alternate"));
|
|
||||||
view.colorOdd (alternate);
|
|
||||||
|
|
||||||
if (context.config.getBoolean ("fontunderline"))
|
|
||||||
{
|
|
||||||
view.colorHeader (Color ("underline " + context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
view.underlineHeaders ();
|
|
||||||
view.colorHeader (Color (context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (context.config.getBoolean ("fontunderline"))
|
|
||||||
{
|
|
||||||
view.colorHeader (Color ("underline " + context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
view.underlineHeaders ();
|
|
||||||
view.colorHeader (Color (context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Datetime now;
|
Datetime now;
|
||||||
|
|
||||||
|
@ -456,33 +428,12 @@ int CmdInfo::execute (std::string& output)
|
||||||
Table urgencyDetails;
|
Table urgencyDetails;
|
||||||
if (task.urgency () != 0.0)
|
if (task.urgency () != 0.0)
|
||||||
{
|
{
|
||||||
|
setHeaderUnderline (urgencyDetails);
|
||||||
if (context.color ())
|
if (context.color ())
|
||||||
{
|
{
|
||||||
Color alternate (context.config.get ("color.alternate"));
|
Color alternate (context.config.get ("color.alternate"));
|
||||||
urgencyDetails.colorOdd (alternate);
|
urgencyDetails.colorOdd (alternate);
|
||||||
urgencyDetails.intraColorOdd (alternate);
|
urgencyDetails.intraColorOdd (alternate);
|
||||||
|
|
||||||
if (context.config.getBoolean ("fontunderline"))
|
|
||||||
{
|
|
||||||
urgencyDetails.colorHeader (Color ("underline " + context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
urgencyDetails.underlineHeaders ();
|
|
||||||
urgencyDetails.colorHeader (Color (context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (context.config.getBoolean ("fontunderline"))
|
|
||||||
{
|
|
||||||
urgencyDetails.colorHeader (Color ("underline " + context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
urgencyDetails.underlineHeaders ();
|
|
||||||
urgencyDetails.colorHeader (Color (context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context.config.getBoolean ("obfuscate"))
|
if (context.config.getBoolean ("obfuscate"))
|
||||||
|
@ -577,36 +528,7 @@ int CmdInfo::execute (std::string& output)
|
||||||
|
|
||||||
// Create a third table, containing undo log change details.
|
// Create a third table, containing undo log change details.
|
||||||
Table journal;
|
Table journal;
|
||||||
|
setHeaderUnderline (journal);
|
||||||
// If an alternating row color is specified, notify the table.
|
|
||||||
if (context.color ())
|
|
||||||
{
|
|
||||||
Color alternate (context.config.get ("color.alternate"));
|
|
||||||
journal.colorOdd (alternate);
|
|
||||||
journal.intraColorOdd (alternate);
|
|
||||||
|
|
||||||
if (context.config.getBoolean ("fontunderline"))
|
|
||||||
{
|
|
||||||
journal.colorHeader (Color ("underline " + context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
journal.underlineHeaders ();
|
|
||||||
journal.colorHeader (Color (context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (context.config.getBoolean ("fontunderline"))
|
|
||||||
{
|
|
||||||
journal.colorHeader (Color ("underline " + context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
journal.underlineHeaders ();
|
|
||||||
journal.colorHeader (Color (context.config.get ("color.label")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (context.config.getBoolean ("obfuscate"))
|
if (context.config.getBoolean ("obfuscate"))
|
||||||
journal.obfuscate ();
|
journal.obfuscate ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue