mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 17:07:19 +02:00
Feature #1099
- Added Feature #1099, which supports the 'color.uda.<uda-name>' color rule (thanks to Florian Hollerweger).
This commit is contained in:
parent
7710c7a623
commit
d8579730f5
8 changed files with 84 additions and 2 deletions
|
@ -211,6 +211,13 @@ static void colorizeKeyword (Task& task, const std::string& rule, const Color& b
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static void colorizeUDA (Task& task, const std::string& rule, const Color& base, Color& c)
|
||||
{
|
||||
if (task.has (rule.substr (10)))
|
||||
c.blend (base);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
static void colorizeDue (Task& task, const Color& base, Color& c)
|
||||
{
|
||||
|
@ -313,6 +320,7 @@ void autoColorize (Task& task, Color& c)
|
|||
else if (r->substr (0, 10) == "color.tag.") colorizeTag (task, *r, base, c);
|
||||
else if (r->substr (0, 14) == "color.project.") colorizeProject (task, *r, base, c);
|
||||
else if (r->substr (0, 14) == "color.keyword.") colorizeKeyword (task, *r, base, c);
|
||||
else if (r->substr (0, 10) == "color.uda.") colorizeUDA (task, *r, base, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue