CmdCalendar: Table headers consistent

This commit is contained in:
Paul Beckingham 2017-03-20 09:08:45 -04:00
parent b162748e26
commit 412e804b93

View file

@ -286,7 +286,6 @@ int CmdCalendar::execute (std::string& output)
Color color_weekend (context.config.get ("color.calendar.weekend"));
Color color_holiday (context.config.get ("color.calendar.holiday"));
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"))
out << "Legend: "
@ -368,7 +367,7 @@ int CmdCalendar::execute (std::string& output)
holTable.width (context.getWidth ());
holTable.add (STRING_CMD_CAL_LABEL_DATE);
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
for (auto& it : context.config)
@ -428,10 +427,8 @@ std::string CmdCalendar::renderMonths (
throw std::string (STRING_CMD_CAL_SUN_MON);
// Build table for the number of months to be displayed.
Color label (context.config.get ("color.label"));
Table view;
view.colorHeader (label);
setHeaderUnderline (view);
view.width (context.getWidth ());
for (int i = 0 ; i < (monthsPerLine * 8); i += 8)
{