Skip to content

Commit

Permalink
Use special color-palette entry for 'marked' items
Browse files Browse the repository at this point in the history
This improves readability. Marked items look now differently from the
focused one.
  • Loading branch information
mruwek committed Apr 11, 2016
1 parent b7059d7 commit f9e1606
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions topydo/ui/Main.py
Expand Up @@ -179,6 +179,7 @@ def _create_color_palette(self):
('link', '', '', '', link_color, ''),
('link_focus', '', 'light gray', '', link_color, None),
('default_focus', 'black', 'light gray'),
('marked', '', 'light blue'),
]

for C in ascii_uppercase:
Expand Down
11 changes: 9 additions & 2 deletions topydo/ui/TodoWidget.py
Expand Up @@ -135,7 +135,14 @@ def selectable(self):
return True

def mark(self):
self.widget.set_attr_map({None: _markup(self.todo, True)})
attr_map = {
None: 'marked',
'link': 'marked',
'context': 'marked',
'project': 'marked',
'metadata': 'marked',
}
self.widget.set_attr_map(attr_map)

def unmark(self):
self.widget.set_attr_map({None: _markup(self.todo, False)})
self.widget.set_attr_map(_markup(self.todo, False))

0 comments on commit f9e1606

Please sign in to comment.