[Update] Config Window: Mic/Speaker Dynamic Energy Thresholdのオンオフで、Mic/Speaker Energy ThresholdのWidgetを折りたたんだり開いたり。初期値に合わせた動作も含めて実装。

[bugfix] Speaker Dynamic Energy ThresholdにMicのctk variableを設定していたのを修正。
This commit is contained in:
Sakamoto Shiina
2023-10-12 11:50:39 +09:00
parent fd433754fc
commit 17b33d57df
5 changed files with 56 additions and 27 deletions

25
view.py
View File

@@ -476,6 +476,13 @@ class View():
)
if config.INPUT_MIC_DYNAMIC_ENERGY_THRESHOLD is True:
self.closeMicEnergyThresholdWidget()
if config.INPUT_SPEAKER_DYNAMIC_ENERGY_THRESHOLD is True:
self.closeSpeakerEnergyThresholdWidget()
# Insert sample conversation for testing.
# self._insertSampleConversationToTextbox()
@@ -692,6 +699,24 @@ class View():
def setWidgetsStatus_ConfigWindowCompactModeSwitch_Normal():
vrct_gui.config_window.setting_box_compact_mode_switch_box.configure(state="normal")
@staticmethod
def openMicEnergyThresholdWidget():
vrct_gui.config_window.sb__mic_dynamic_energy_threshold.grid(pady=0)
vrct_gui.config_window.sb__mic_energy_threshold.grid()
@staticmethod
def closeMicEnergyThresholdWidget():
vrct_gui.config_window.sb__mic_dynamic_energy_threshold.grid(pady=(0,1))
vrct_gui.config_window.sb__mic_energy_threshold.grid_remove()
@staticmethod
def openSpeakerEnergyThresholdWidget():
vrct_gui.config_window.sb__speaker_dynamic_energy_threshold.grid(pady=0)
vrct_gui.config_window.sb__speaker_energy_threshold.grid()
@staticmethod
def closeSpeakerEnergyThresholdWidget():
vrct_gui.config_window.sb__speaker_dynamic_energy_threshold.grid(pady=(0,1))
vrct_gui.config_window.sb__speaker_energy_threshold.grid_remove()
@staticmethod
def setWidgetsStatus_ThresholdCheckButton_Disabled():
vrct_gui._changeConfigWindowWidgetsStatus(