Skip to content

Commit

Permalink
Revert toga back to 0.3.0.dev39
Browse files Browse the repository at this point in the history
This reverts commit 535dc1b.
  • Loading branch information
timmh committed Mar 25, 2024
1 parent d97b8ec commit 0cd9b07
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion requirements_macos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0cd9b07

Please sign in to comment.