diff options
author | Joris | 2020-08-03 12:38:20 +0200 |
---|---|---|
committer | Joris | 2020-08-03 12:38:22 +0200 |
commit | 36b4d28cacf4894c3a41ca5a4f6f2e3536a7c274 (patch) | |
tree | ee11ead48cafe3420f7b4b6567f78334d07dc8ea | |
parent | 971b6486fa98085fe7ed698bb6b4bc476bc8beaa (diff) |
Highlight tasks having a description
Print a star at the end of tasks names for the tasks that have a
description.
-rw-r--r-- | todo/gui/tasks/table/widget.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/todo/gui/tasks/table/widget.py b/todo/gui/tasks/table/widget.py index 2df2764..9e810af 100644 --- a/todo/gui/tasks/table/widget.py +++ b/todo/gui/tasks/table/widget.py @@ -123,7 +123,11 @@ class Widget(QtWidgets.QTableWidget): def update_row(self, row: int): task = self._tasks[row] self.setItem(row, 0, item(age_since(task.created_at))) - self.setItem(row, 1, item(task.name)) + if task.description: + name = task.name + " *" + else: + name = task.name + self.setItem(row, 1, item(name)) self.setCellWidget(row, 2, colored_label(self, todo.gui.tasks.duration.format(task.duration), todo.gui.tasks.duration.color(task.duration))) self.setCellWidget(row, 3, colored_label(self, difficulty.format(task.difficulty), difficulty_color(task.difficulty))) self.setCellWidget(row, 4, colored_label(self, priority.format(task.priority), priority_color(task.priority))) |