From d11f9d716f402a8f45e1088d841e5cc86a60228f Mon Sep 17 00:00:00 2001 From: misygauziya Date: Thu, 13 Jul 2023 15:43:44 +0900 Subject: [PATCH] =?UTF-8?q?withdraw=E3=81=AE=E3=82=BF=E3=82=A4=E3=83=9F?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VRCT.py | 2 -- window_config.py | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VRCT.py b/VRCT.py index c46216d3..66622465 100644 --- a/VRCT.py +++ b/VRCT.py @@ -398,11 +398,9 @@ class App(CTk): self.protocol("WM_DELETE_WINDOW", self.delete_window) self.config_window = ToplevelWindowConfig(self) - self.config_window.withdraw() def button_config_callback(self): # if self.config_window is None or not self.config_window.winfo_exists(): - # # self.config_window = ToplevelWindowConfig(self) self.config_window.deiconify() self.checkbox_translation.configure(state="disabled") self.checkbox_transcription_send.configure(state="disabled") diff --git a/window_config.py b/window_config.py index 27ab3859..1e4be837 100644 --- a/window_config.py +++ b/window_config.py @@ -16,6 +16,7 @@ class ToplevelWindowConfig(CTkToplevel): def __init__(self, parent, *args, **kwargs): super().__init__(parent, *args, **kwargs) + self.withdraw() self.parent = parent # self.geometry(f"{350}x{270}") # self.resizable(False, False) @@ -167,6 +168,7 @@ class ToplevelWindowConfig(CTkToplevel): save_json(self.parent.PATH_CONFIG, "FONT_FAMILY", self.parent.FONT_FAMILY) def optionmenu_ui_language_callback(self, choice): + self.withdraw() pre_language_yaml_data = get_localized_text(f"{self.parent.UI_LANGUAGE}") self.parent.UI_LANGUAGE = get_key_by_value(selectable_languages, choice) language_yaml_data = get_localized_text(f"{self.parent.UI_LANGUAGE}") @@ -186,6 +188,7 @@ class ToplevelWindowConfig(CTkToplevel): # self.parent.information_window.textbox_information.configure(font=customtkinter.CTkFont(family=choice)) # except: # pass + self.deiconify() def optionmenu_translation_translator_callback(self, choice): if self.parent.translator.authentication(choice, self.parent.AUTH_KEYS[choice]) is False: