diff --git a/controller.py b/controller.py index 80ce9dc8..05f1829f 100644 --- a/controller.py +++ b/controller.py @@ -424,12 +424,10 @@ def callbackCheckMicThreshold(is_turned_on): view.replaceMicThresholdCheckButton_Disabled() model.startCheckMicEnergy(setProgressBarMicEnergy, view.initProgressBar_MicEnergy) view.replaceMicThresholdCheckButton_Active() - view.setWidgetsStatus_ThresholdCheckButton_Normal() else: view.replaceMicThresholdCheckButton_Disabled() model.stopCheckMicEnergy() view.replaceMicThresholdCheckButton_Passive() - view.setWidgetsStatus_ThresholdCheckButton_Normal() def callbackSetMicRecordTimeout(value): print("callbackSetMicRecordTimeout", value) @@ -522,12 +520,10 @@ def callbackCheckSpeakerThreshold(is_turned_on): view.replaceSpeakerThresholdCheckButton_Disabled() model.startCheckSpeakerEnergy(setProgressBarSpeakerEnergy, view.initProgressBar_SpeakerEnergy) view.replaceSpeakerThresholdCheckButton_Active() - view.setWidgetsStatus_ThresholdCheckButton_Normal() else: view.replaceSpeakerThresholdCheckButton_Disabled() model.stopCheckSpeakerEnergy() view.replaceSpeakerThresholdCheckButton_Passive() - view.setWidgetsStatus_ThresholdCheckButton_Normal() def callbackSetSpeakerRecordTimeout(value): print("callbackSetSpeakerRecordTimeout", value) diff --git a/view.py b/view.py index bc8974a1..3a0187e4 100644 --- a/view.py +++ b/view.py @@ -718,25 +718,6 @@ class View(): 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( - status="disabled", - target_names=[ - "mic_energy_threshold_check_button", - "speaker_energy_threshold_check_button", - ] - ) - - @staticmethod - def setWidgetsStatus_ThresholdCheckButton_Normal(): - vrct_gui._changeConfigWindowWidgetsStatus( - status="normal", - target_names=[ - "mic_energy_threshold_check_button", - "speaker_energy_threshold_check_button", - ] - ) def initMicThresholdCheckButton(self): diff --git a/vrct_gui/_changeConfigWindowWidgetsStatus.py b/vrct_gui/_changeConfigWindowWidgetsStatus.py index 0183c886..39ca924b 100644 --- a/vrct_gui/_changeConfigWindowWidgetsStatus.py +++ b/vrct_gui/_changeConfigWindowWidgetsStatus.py @@ -1,8 +1,8 @@ from customtkinter import CTkImage def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, status, target_names): - if target_names == "All": - target_names = ["mic_energy_threshold_check_button", "speaker_energy_threshold_check_button"] + # if target_names == "All": + # target_names = [] def disableOptionmenuWidget(target_widget): @@ -17,25 +17,6 @@ def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, sta for target_name in target_names: match target_name: - case "mic_energy_threshold_check_button": - if status == "disabled": - config_window.sb__progressbar_x_slider__passive_button_mic_energy_threshold.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR) - config_window.sb__progressbar_x_slider__passive_button_mic_energy_threshold.children["!ctklabel"].configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR) - - elif status == "normal": - config_window.sb__progressbar_x_slider__passive_button_mic_energy_threshold.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR) - config_window.sb__progressbar_x_slider__passive_button_mic_energy_threshold.children["!ctklabel"].configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR) - - case "speaker_energy_threshold_check_button": - if status == "disabled": - config_window.sb__progressbar_x_slider__passive_button_speaker_energy_threshold.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR) - config_window.sb__progressbar_x_slider__passive_button_speaker_energy_threshold.children["!ctklabel"].configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_DISABLED_COLOR) - - elif status == "normal": - config_window.sb__progressbar_x_slider__passive_button_speaker_energy_threshold.configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR) - config_window.sb__progressbar_x_slider__passive_button_speaker_energy_threshold.children["!ctklabel"].configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR) - - case "sb__optionmenu_mic_host": if status == "disabled": target_widget = config_window.sb__widgets["sb__optionmenu_mic_host"]