This commit is contained in:
Sander Land committed 2020-09-05 17:01:44 +02:00
1 parent f035627b1d
commit 58f91072eb
3 files changed
+14 -10

No files matched your search

+3 -2
View File
@@ -211,7 +211,7 @@ class KeyValueSpinner(Spinner):
value_refs = ListProperty() value_refs = ListProperty()
selected_index = NumericProperty(0) selected_index = NumericProperty(0)
font_name = StringProperty(DEFAULT_FONT) font_name = StringProperty(DEFAULT_FONT)
no_update = BooleanProperty(False)
def __init__(self, **kwargs): def __init__(self, **kwargs):
super().__init__(**kwargs) super().__init__(**kwargs)
self.build_values() self.build_values()
@@ -230,9 +230,10 @@ class KeyValueSpinner(Spinner):
new_index = self.values.index(text) new_index = self.values.index(text)
if new_index != self.selected_index: if new_index != self.selected_index:
self.selected_index = new_index self.selected_index = new_index
self.dispatch("on_select") return self.dispatch("on_select")
except (ValueError, IndexError): except (ValueError, IndexError):
pass pass
return not self.no_update
def on_select(self, *args): def on_select(self, *args):
pass pass
+5 -5
View File
@@ -453,9 +453,9 @@ class ConfigPopup(QuickConfigGui):
self.katago_files.text = katas_available_msg self.katago_files.text = katas_available_msg
MODELS = { MODELS = {
"latest 20b": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170e-b20c256x2-s5303129600-d1228401921.bin.gz", "Latest 20 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170e-b20c256x2-s5303129600-d1228401921.bin.gz",
"latest 30b": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b30c320x2-s4824661760-d1229536699.bin.gz", "Latest 30 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b30c320x2-s4824661760-d1229536699.bin.gz",
"latest 40b": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b40c256x2-s5095420928-d1229425124.bin.gz", "Latest 40 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b40c256x2-s5095420928-d1229425124.bin.gz",
} }
KATAGOS = { KATAGOS = {
@@ -472,8 +472,8 @@ class ConfigPopup(QuickConfigGui):
"OpenCL v1.6.1 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1%2Bbs29/katago-v1.6.1+bs29-gpu-opencl-linux-x64.zip", "OpenCL v1.6.1 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1%2Bbs29/katago-v1.6.1+bs29-gpu-opencl-linux-x64.zip",
}, },
"just-descriptions": { "just-descriptions": {
"CUDA v1.6.1 (New NVIDIA cards)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1/katago-v1.6.1-gpu-cuda10.2-windows-x64.zip", "CUDA v1.6.1 (Windows)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1/katago-v1.6.1-gpu-cuda10.2-windows-x64.zip",
"CUDA v1.6.1 (New NVIDIA cards)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1/katago-v1.6.1-gpu-cuda10.2-linux-x64.zip", "CUDA v1.6.1 (Linux)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1/katago-v1.6.1-gpu-cuda10.2-linux-x64.zip",
}, },
} }
+6 -3
View File
@@ -112,8 +112,9 @@
KeyValueSpinner: KeyValueSpinner:
id: katago_files id: katago_files
text: '' text: ''
no_update: True
on_select: on_select:
if self.selected_index != 0: katago_path.text = self.values[self.selected_index] if self.selected_index != 0: katago_path.text = self.value_keys[self.selected_index]
size_hint_y: 0.7 size_hint_y: 0.7
sync_height_frac: 1.0 sync_height_frac: 1.0
-font_size: self.height * 0.5 -font_size: self.height * 0.5
@@ -139,10 +140,12 @@
on_press: root.download_models() on_press: root.download_models()
size_hint_y: 0.7 size_hint_y: 0.7
AnchorLayout: AnchorLayout:
Spinner: KeyValueSpinner:
id: model_files id: model_files
text: '' text: ''
on_text: if self.text and self.text != self.values[0]: model_path.text = args[1] no_update: True
on_select:
if self.selected_index != 0: katago_path.text = self.value_keys[self.selected_index]
size_hint_y: 0.7 size_hint_y: 0.7
sync_height_frac: 1.0 sync_height_frac: 1.0
-font_size: self.height * 0.5 -font_size: self.height * 0.5