From 2b479fae26b7446f9269223d1e1fb4073839f5cc Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 10 May 2020 14:43:24 +0200 Subject: Improve difficulty and priority reading --- src/gui/tasks/form/widget.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui/tasks/form') diff --git a/src/gui/tasks/form/widget.py b/src/gui/tasks/form/widget.py index 846ce90..adaf757 100644 --- a/src/gui/tasks/form/widget.py +++ b/src/gui/tasks/form/widget.py @@ -4,7 +4,7 @@ from typing import Optional, Tuple, List, Any import db.tasks from model.task import Task, ValidTaskForm from model import difficulty, priority -import gui.icons +import gui.icon import gui.tasks.form.state import gui.tasks.duration @@ -45,7 +45,7 @@ def widget( init_tag = task.tag if task is not None else '' tag_input = line_edit(grid, grid_layout, 2, 'Tag', init_tag) - init_difficulty = task.difficulty if task is not None else difficulty.Difficulty.MEDIUM + init_difficulty = task.difficulty if task is not None else difficulty.Difficulty.NORMAL difficulty_input = combo_box( grid, grid_layout, @@ -54,7 +54,7 @@ def widget( [difficulty.format(d) for d in difficulty.values], int(init_difficulty)) - init_priority = task.priority if task is not None else priority.Priority.MEDIUM + init_priority = task.priority if task is not None else priority.Priority.MIDDLE priority_input = combo_box( grid, grid_layout, @@ -160,7 +160,7 @@ def buttons(parent, action_title, task_form_signal, on_validate, on_cancel): validate = QtWidgets.QPushButton(action_title, widget) validate.setDisabled(True) - validate.setIcon(gui.icons.dialog_apply(validate.style())) + validate.setIcon(gui.icon.dialog_apply(validate.style())) validate.clicked.connect(on_validate); layout.addWidget(validate) @@ -173,7 +173,7 @@ def buttons(parent, action_title, task_form_signal, on_validate, on_cancel): task_form_signal.connect(on_task_form_signal) cancel = QtWidgets.QPushButton('cancel', widget) - cancel.setIcon(gui.icons.dialog_cancel(cancel.style())) + cancel.setIcon(gui.icon.dialog_cancel(cancel.style())) cancel.clicked.connect(on_cancel) layout.addWidget(cancel) -- cgit v1.2.3