aboutsummaryrefslogtreecommitdiff
path: root/src/gui/tasks/table
diff options
context:
space:
mode:
authorJoris2020-05-10 14:43:24 +0200
committerJoris2020-05-10 14:43:24 +0200
commit2b479fae26b7446f9269223d1e1fb4073839f5cc (patch)
tree8a15017b80e94e778857fe856160c36865568a1d /src/gui/tasks/table
parent7372ab407535ade48ce0b642ae051990e3bef7ed (diff)
Improve difficulty and priority reading
Diffstat (limited to 'src/gui/tasks/table')
-rw-r--r--src/gui/tasks/table/menu.py4
-rw-r--r--src/gui/tasks/table/model.py16
2 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/tasks/table/menu.py b/src/gui/tasks/table/menu.py
index 51f7330..edc9833 100644
--- a/src/gui/tasks/table/menu.py
+++ b/src/gui/tasks/table/menu.py
@@ -10,11 +10,11 @@ def open(database, table, update_task_signal, position):
menu = QtWidgets.QMenu(table)
if len(rows) == 1:
- modify_action = menu.addAction(gui.icons.dialog_open(menu.style()), 'modify')
+ modify_action = menu.addAction(gui.icon.dialog_open(menu.style()), 'modify')
else:
modify_action = QtWidgets.QAction(menu)
- delete_action = menu.addAction(gui.icons.trash(menu.style()), 'Delete')
+ delete_action = menu.addAction(gui.icon.trash(menu.style()), 'Delete')
action = menu.exec_(table.mapToGlobal(position))
if action == modify_action and len(rows) == 1:
diff --git a/src/gui/tasks/table/model.py b/src/gui/tasks/table/model.py
index 5013569..062ded6 100644
--- a/src/gui/tasks/table/model.py
+++ b/src/gui/tasks/table/model.py
@@ -139,17 +139,17 @@ def is_reversed(row: int, order: Qt.SortOrder) -> bool:
return order == Qt.DescendingOrder
def difficulty_color(d: Difficulty) -> QtGui.QColor:
- if d == Difficulty.LOW:
- return gui.color.low_difficulty
- elif d == Difficulty.MEDIUM:
- return gui.color.medium_difficulty
- elif d == Difficulty.HIGH:
- return gui.color.high_difficulty
+ if d == Difficulty.EASY:
+ return gui.color.easy_difficulty
+ elif d == Difficulty.NORMAL:
+ return gui.color.normal_difficulty
+ elif d == Difficulty.HARD:
+ return gui.color.hard_difficulty
def priority_color(p: Priority) -> QtGui.QColor:
if p == Priority.LOW:
return gui.color.low_priority
- elif p == Priority.MEDIUM:
- return gui.color.medium_priority
+ elif p == Priority.MIDDLE:
+ return gui.color.middle_priority
elif p == Priority.HIGH:
return gui.color.high_priority