mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
ColParent: Now uses ::renderStringLeft
This commit is contained in:
parent
04c3e9e537
commit
668fd2301e
1 changed files with 3 additions and 12 deletions
|
@ -37,7 +37,6 @@ extern Context context;
|
|||
ColumnParent::ColumnParent ()
|
||||
{
|
||||
_name = "parent";
|
||||
_type = "string";
|
||||
_style = "long";
|
||||
_label = STRING_COLUMN_LABEL_PARENT;
|
||||
_modifiable = false;
|
||||
|
@ -76,19 +75,11 @@ void ColumnParent::render (
|
|||
{
|
||||
// f30cb9c3-3fc0-483f-bfb2-3bf134f00694 default
|
||||
// 34f00694 short
|
||||
if (_style == "default" ||
|
||||
_style == "long")
|
||||
{
|
||||
lines.push_back (color.colorize (leftJustify (task.get (_name), width)));
|
||||
}
|
||||
if (_style == "default" || _style == "long")
|
||||
renderStringLeft (lines, width, color, task.get(_name));
|
||||
|
||||
else if (_style == "short")
|
||||
{
|
||||
if (task.has (_name))
|
||||
lines.push_back (color.colorize (leftJustify (task.get (_name).substr (28), width)));
|
||||
else
|
||||
lines.push_back (color.colorize (leftJustify ("", width)));
|
||||
}
|
||||
renderStringLeft (lines, width, color, task.get (_name).substr (28));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue