Add color support
You can change the default color by changing the props (.props file for the filesystem storage backend).
This commit is contained in:
@ -434,6 +434,14 @@ class Collection(object):
|
||||
with self.props as props:
|
||||
return props.get("D:displayname", self.path.split(os.path.sep)[-1])
|
||||
|
||||
@property
|
||||
def color(self):
|
||||
"""Collection color."""
|
||||
with self.props as props:
|
||||
if "A:calendar-color" not in props:
|
||||
props["A:calendar-color"] = "#5ba209"
|
||||
return props["A:calendar-color"]
|
||||
|
||||
@property
|
||||
def headers(self):
|
||||
"""Find headers items in collection."""
|
||||
|
Reference in New Issue
Block a user