From 83546d34227492f321318fbc513bc21f43774fcb Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 18 Sep 2019 17:23:11 +0200 Subject: [PATCH 1/2] Make the "No Task" entry clearly distinct from actual tasks --- avalon/tools/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/avalon/tools/models.py b/avalon/tools/models.py index 128e838cf..810375bd6 100644 --- a/avalon/tools/models.py +++ b/avalon/tools/models.py @@ -195,7 +195,9 @@ def __init__(self): self._num_assets = 0 self._icons = { "__default__": qtawesome.icon("fa.male", - color=style.colors.default) + color=style.colors.default), + "__no_task__": qtawesome.icon("fa.exclamation-circle", + color=style.colors.mid) } self._get_task_icons() @@ -241,7 +243,7 @@ def set_assets(self, asset_ids): item = Item({ "name": "No task", "count": 0, - "icon": default_icon, + "icon": self._icons["__no_task__"], "enabled": False, }) From a13433b3424d1f628af3127ae5a92c6682467849 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 18 Sep 2019 18:34:39 +0200 Subject: [PATCH 2/2] Increase code style consistency with lines above, declare variable first --- avalon/tools/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avalon/tools/models.py b/avalon/tools/models.py index 810375bd6..513b3ffc3 100644 --- a/avalon/tools/models.py +++ b/avalon/tools/models.py @@ -240,10 +240,11 @@ def set_assets(self, asset_ids): default_icon = self._icons["__default__"] if not tasks: + no_task_icon = self._icons["__no_task__"] item = Item({ "name": "No task", "count": 0, - "icon": self._icons["__no_task__"], + "icon": no_task_icon, "enabled": False, })