color project icons
This commit is contained in:
12
ui.py
12
ui.py
@@ -12,6 +12,7 @@ palette = [
|
|||||||
('header', 'bold,light green', ''),
|
('header', 'bold,light green', ''),
|
||||||
('secondary', 'light gray', ''),
|
('secondary', 'light gray', ''),
|
||||||
('task', 'light green', ''),
|
('task', 'light green', ''),
|
||||||
|
('project', 'yellow', ''),
|
||||||
('section', 'white', 'dark green'),
|
('section', 'white', 'dark green'),
|
||||||
('workspace', 'white', 'dark blue'),
|
('workspace', 'white', 'dark blue'),
|
||||||
('pager', 'standout', ''),
|
('pager', 'standout', ''),
|
||||||
@@ -71,8 +72,8 @@ class ProjectList(urwid.ListBox):
|
|||||||
self.projects = projects
|
self.projects = projects
|
||||||
|
|
||||||
body = urwid.SimpleFocusListWalker(
|
body = urwid.SimpleFocusListWalker(
|
||||||
[ProjectIcon({'name': 'My Tasks', 'id': None},
|
[urwid.AttrMap(ProjectIcon({'name': 'My Tasks', 'id': None},
|
||||||
self.loadProject),
|
self.loadProject), 'project'),
|
||||||
None]
|
None]
|
||||||
)
|
)
|
||||||
super(ProjectList, self).__init__(body)
|
super(ProjectList, self).__init__(body)
|
||||||
@@ -82,8 +83,8 @@ class ProjectList(urwid.ListBox):
|
|||||||
self.body.pop()
|
self.body.pop()
|
||||||
for i in range(50):
|
for i in range(50):
|
||||||
try:
|
try:
|
||||||
self.body.append(ProjectIcon(self.projects.next(),
|
self.body.append(urwid.AttrMap(ProjectIcon(self.projects.next(),
|
||||||
self.loadProject))
|
self.loadProject), 'project'))
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -285,7 +286,8 @@ class TaskDetails(urwid.ListBox):
|
|||||||
self.userTypeAhead)
|
self.userTypeAhead)
|
||||||
urwid.connect_signal(assignee_type_ahead, 'assigntask', self.assignTask)
|
urwid.connect_signal(assignee_type_ahead, 'assigntask', self.assignTask)
|
||||||
|
|
||||||
projects = [ProjectIcon(project, self.loadProject)
|
projects = [urwid.AttrMap(ProjectIcon(project, self.loadProject),
|
||||||
|
'project')
|
||||||
for project in task['projects']]
|
for project in task['projects']]
|
||||||
|
|
||||||
if task['parent'] != None:
|
if task['parent'] != None:
|
||||||
|
|||||||
Reference in New Issue
Block a user