mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CmdCalendar: Table headers consistent
This commit is contained in:
parent
a1a9cb7786
commit
2a7d6eb26a
1 changed files with 2 additions and 5 deletions
|
@ -286,7 +286,6 @@ int CmdCalendar::execute (std::string& output)
|
||||||
Color color_weekend (context.config.get ("color.calendar.weekend"));
|
Color color_weekend (context.config.get ("color.calendar.weekend"));
|
||||||
Color color_holiday (context.config.get ("color.calendar.holiday"));
|
Color color_holiday (context.config.get ("color.calendar.holiday"));
|
||||||
Color color_weeknumber (context.config.get ("color.calendar.weeknumber"));
|
Color color_weeknumber (context.config.get ("color.calendar.weeknumber"));
|
||||||
Color color_label (context.config.get ("color.label"));
|
|
||||||
|
|
||||||
if (context.color () && context.config.getBoolean ("calendar.legend"))
|
if (context.color () && context.config.getBoolean ("calendar.legend"))
|
||||||
out << "Legend: "
|
out << "Legend: "
|
||||||
|
@ -368,7 +367,7 @@ int CmdCalendar::execute (std::string& output)
|
||||||
holTable.width (context.getWidth ());
|
holTable.width (context.getWidth ());
|
||||||
holTable.add (STRING_CMD_CAL_LABEL_DATE);
|
holTable.add (STRING_CMD_CAL_LABEL_DATE);
|
||||||
holTable.add (STRING_CMD_CAL_LABEL_HOL);
|
holTable.add (STRING_CMD_CAL_LABEL_HOL);
|
||||||
holTable.colorHeader (color_label);
|
setHeaderUnderline (holTable);
|
||||||
|
|
||||||
std::map <time_t, std::vector<std::string>> hm; // we need to store multiple holidays per day
|
std::map <time_t, std::vector<std::string>> hm; // we need to store multiple holidays per day
|
||||||
for (auto& it : context.config)
|
for (auto& it : context.config)
|
||||||
|
@ -428,10 +427,8 @@ std::string CmdCalendar::renderMonths (
|
||||||
throw std::string (STRING_CMD_CAL_SUN_MON);
|
throw std::string (STRING_CMD_CAL_SUN_MON);
|
||||||
|
|
||||||
// Build table for the number of months to be displayed.
|
// Build table for the number of months to be displayed.
|
||||||
Color label (context.config.get ("color.label"));
|
|
||||||
|
|
||||||
Table view;
|
Table view;
|
||||||
view.colorHeader (label);
|
setHeaderUnderline (view);
|
||||||
view.width (context.getWidth ());
|
view.width (context.getWidth ());
|
||||||
for (int i = 0 ; i < (monthsPerLine * 8); i += 8)
|
for (int i = 0 ; i < (monthsPerLine * 8); i += 8)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue