From 0cd9b076b6a3611fc3417407961090b88ec32712 Mon Sep 17 00:00:00 2001 From: Timm Haucke Date: Mon, 25 Mar 2024 18:27:15 -0400 Subject: [PATCH] Revert toga back to 0.3.0.dev39 This reverts commit 535dc1bb1a2dd070b63ec8588705b151e8d2e749. --- main.py | 8 ++++---- requirements.txt | 3 ++- requirements_macos.txt | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 220e506..7ca2549 100644 --- a/main.py +++ b/main.py @@ -28,11 +28,11 @@ def build_config_inputs(config, container, on_config_change): value_type = type(value) if value_type is float: - input = toga.NumberInput(value=value, step=Decimal("0.01"), on_change=lambda input, var=var: on_config_change(var, float(input.value))) + input = toga.NumberInput(default=value, step=Decimal("0.01"), on_change=lambda input, var=var: on_config_change(var, float(input.value))) elif value_type is int: - input = toga.NumberInput(value=value, step=1, on_change=lambda input, var=var: on_config_change(var, int(input.value))) + input = toga.NumberInput(default=value, step=1, on_change=lambda input, var=var: on_config_change(var, int(input.value))) elif value_type is bool: - input = toga.Switch("", value=value, on_change=lambda input, var=var: on_config_change(var, input.value)) + input = toga.Switch("", is_on=value, on_toggle=lambda input, var=var: on_config_change(var, input.is_on)) elif issubclass(value_type, Enum): input = toga.Selection(items=[e for e in dir(type(value)) if not e.startswith("_")], on_select=lambda input, var=var, default_type=value_type: on_config_change(var, getattr(default_type, input.value))) input.value = value.name @@ -113,7 +113,7 @@ def load_config(config_path): data_dir_box = toga.Box() data_dir_box.style.padding = 15 - data_dir_label = toga.TextInput(readonly=True, value=config.data_dir) + data_dir_label = toga.TextInput(readonly=True, initial=config.data_dir) data_dir_label.style.flex = 1 data_dir_label.style.padding_left = 15 diff --git a/requirements.txt b/requirements.txt index e9def78..7975558 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,10 @@ matplotlib==3.5.1 numpy==1.22.2 onnxruntime==1.17.1 +onnxruntime-gpu==1.17.1 opencv-python==4.5.4.60 pyinstaller==5.6.2 scikit-learn==1.1.1 -toga==0.4.0 +toga==0.3.0.dev39 tqdm==4.64.0 platformdirs==4.2.0 \ No newline at end of file diff --git a/requirements_macos.txt b/requirements_macos.txt index 4eebcfd..6216d19 100644 --- a/requirements_macos.txt +++ b/requirements_macos.txt @@ -4,7 +4,7 @@ onnxruntime==1.17.1 opencv-python==4.5.4.60 pyinstaller==5.6.2 scikit-learn==1.1.1 -toga==0.4.0 +toga==0.3.0.dev39 tqdm==4.64.0 platformdirs==4.2.0 dmgbuild==1.6.0 \ No newline at end of file