Config Window 各設定項目を変数化し、ctk variableなど全てview.pyに移動。

vrct_gui以下ではconfig.pyを使わないように切り離した。
CTkScrollableDropdownを使うことをやめた。(grab_setと干渉するため)
This commit is contained in:
Sakamoto Shiina
2023-09-02 02:19:23 +09:00
parent 3affcc1ee6
commit 2ee8eca63b
12 changed files with 337 additions and 205 deletions

View File

@@ -4,7 +4,7 @@ from .widgets import createConfigWindowTitle, createSideMenuAndSettingsBoxContai
from customtkinter import CTkToplevel
class ConfigWindow(CTkToplevel):
def __init__(self, vrct_gui, settings):
def __init__(self, vrct_gui, settings, view_variable):
super().__init__()
self.withdraw()
@@ -18,47 +18,7 @@ class ConfigWindow(CTkToplevel):
self.protocol("WM_DELETE_WINDOW", vrct_gui.closeConfigWindow)
self.settings = settings
# Appearance Tab
self.CALLBACK_SET_TRANSPARENCY = None
self.CALLBACK_SET_APPEARANCE = None
self.CALLBACK_SET_UI_SCALING = None
self.CALLBACK_SET_FONT_FAMILY = None
self.CALLBACK_SET_UI_LANGUAGE = None
# Translation Tab
self.CALLBACK_SET_DEEPL_AUTHKEY = None
# Transcription Tab (Mic)
self.CALLBACK_SET_MIC_HOST = None
self.CALLBACK_SET_MIC_DEVICE = None
self.CALLBACK_SET_MIC_ENERGY_THRESHOLD = None
self.CALLBACK_SET_MIC_DYNAMIC_ENERGY_THRESHOLD = None
self.CALLBACK_CHECK_MIC_THRESHOLD = None
self.CALLBACK_SET_MIC_RECORD_TIMEOUT = None
self.CALLBACK_SET_MIC_PHRASE_TIMEOUT = None
self.CALLBACK_SET_MIC_MAX_PHRASES = None
self.CALLBACK_SET_MIC_WORD_FILTER = None
# Transcription Tab (Speaker)
self.CALLBACK_SET_SPEAKER_DEVICE = None
self.CALLBACK_SET_SPEAKER_ENERGY_THRESHOLD = None
self.CALLBACK_SET_SPEAKER_DYNAMIC_ENERGY_THRESHOLD = None
self.CALLBACK_CHECK_SPEAKER_THRESHOLD = None
self.CALLBACK_SET_SPEAKER_RECORD_TIMEOUT = None
self.CALLBACK_SET_SPEAKER_PHRASE_TIMEOUT = None
self.CALLBACK_SET_SPEAKER_MAX_PHRASES = None
# Others Tab
self.CALLBACK_SET_ENABLE_AUTO_CLEAR_MESSAGE_BOX = None
self.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY = None
self.CALLBACK_SET_MESSAGE_FORMAT = None
# Advanced Settings Tab
self.CALLBACK_SET_OSC_IP_ADDRESS = None
self.CALLBACK_SET_OSC_PORT = None
self.view_variable = view_variable
createConfigWindowTitle(config_window=self, settings=settings)