- TW-241 new column format; recur.short.
- All duration columns now default to compact ISO duration format.
This commit is contained in:
Paul Beckingham 2014-09-06 15:38:25 -04:00
parent d33de636f1
commit 861cc83e6d
4 changed files with 19 additions and 16 deletions

View file

@ -82,7 +82,7 @@ void ColumnRecur::measure (Task& task, unsigned int& minimum, unsigned int& maxi
if (_style == "default" ||
_style == "duration")
{
minimum = maximum = Duration (task.get ("recur")).formatCompact ().length ();
minimum = maximum = Duration (task.get ("recur")).formatISO ().length ();
}
else if (_style == "indicator")
{
@ -100,21 +100,23 @@ void ColumnRecur::render (
int width,
Color& color)
{
if (_style == "default" ||
_style == "duration")
if (task.has (_name))
{
lines.push_back (
color.colorize (
rightJustify (
Duration (task.get ("recur")).formatCompact (),
width)));
}
else if (_style == "indicator")
{
if (task.has (_name))
if (_style == "default" ||
_style == "duration")
{
lines.push_back (
color.colorize (
rightJustify (
Duration (task.get ("recur")).formatISO (),
width)));
}
else if (_style == "indicator")
{
lines.push_back (
color.colorize (
rightJustify (context.config.get ("recurrence.indicator"), width)));
}
}
}