From 3fcaca917a7745486545483977a846b199ec4252 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:13:33 +0900 Subject: [PATCH] =?UTF-8?q?[Update]=20Main=20Window:=20Transcription=20Mic?= =?UTF-8?q?/Speaker=E3=81=AE=E3=82=AA=E3=83=B3=E3=83=BB=E3=82=AA=E3=83=95?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=80=81Language=20Settings=E9=83=A8?= =?UTF-8?q?=E5=88=86=E3=81=AB=E3=81=9D=E3=82=8C=E3=81=9E=E3=82=8C=E3=82=A2?= =?UTF-8?q?=E3=82=A4=E3=82=B3=E3=83=B3=E8=A1=A8=E7=A4=BA=E3=80=82=E5=B0=91?= =?UTF-8?q?=E3=81=97=E3=81=AFYour=20Language=E3=81=A8Target=20Language?= =?UTF-8?q?=E3=82=92=E6=84=8F=E5=9B=B3=E3=81=97=E3=81=9F=E3=82=82=E3=81=AE?= =?UTF-8?q?=E3=81=A8=E3=81=AF=E5=8F=8D=E5=AF=BE=E3=81=AB=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86=E5=95=8F=E9=A1=8C?= =?UTF-8?q?=E3=82=92=E8=A7=A3=E6=B6=88=E3=81=A7=E3=81=8D=E3=82=8B=E3=81=8B?= =?UTF-8?q?=E3=81=AA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller.py | 4 ++++ view.py | 11 ++++++++++ .../createSidebarLanguagesSettings.py | 21 ++++++++++++++++++- vrct_gui/ui_managers/UiScalingManager.py | 3 +++ 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/controller.py b/controller.py index 6e5a50fd..8afef1bf 100644 --- a/controller.py +++ b/controller.py @@ -303,16 +303,20 @@ def callbackToggleTranscriptionSend(is_turned_on): config.ENABLE_TRANSCRIPTION_SEND = is_turned_on if config.ENABLE_TRANSCRIPTION_SEND is True: startThreadingTranscriptionSendMessage() + view.changeTranscriptionDisplayStatus("MIC_ON") else: stopThreadingTranscriptionSendMessage() + view.changeTranscriptionDisplayStatus("MIC_OFF") def callbackToggleTranscriptionReceive(is_turned_on): view.setMainWindowAllWidgetsStatusToDisabled() config.ENABLE_TRANSCRIPTION_RECEIVE = is_turned_on if config.ENABLE_TRANSCRIPTION_RECEIVE is True: startThreadingTranscriptionReceiveMessage() + view.changeTranscriptionDisplayStatus("SPEAKER_ON") else: stopThreadingTranscriptionReceiveMessage() + view.changeTranscriptionDisplayStatus("SPEAKER_OFF") def callbackToggleForeground(is_turned_on): config.ENABLE_FOREGROUND = is_turned_on diff --git a/view.py b/view.py index 3de218d5..ed187e5a 100644 --- a/view.py +++ b/view.py @@ -801,6 +801,17 @@ class View(): self.view_variable.IS_MAIN_WINDOW_SIDEBAR_COMPACT_MODE = False vrct_gui._disableMainWindowSidebarCompactMode() + def changeTranscriptionDisplayStatus(self, status): + match (status): + case "MIC_ON": + vrct_gui.sls__box_your_language_mic_status__enabled.place(relx=0.1, rely=0.2, anchor="center") + case "MIC_OFF": + vrct_gui.sls__box_your_language_mic_status__enabled.place_forget() + case "SPEAKER_ON": + vrct_gui.sls__box_target_language_speaker_status__enabled.place(relx=0.1, rely=0.2, anchor="center") + case "SPEAKER_OFF": + vrct_gui.sls__box_target_language_speaker_status__enabled.place_forget() + # Config Window def enableConfigWindowCompactMode(self): diff --git a/vrct_gui/main_window/widgets/_create_sidebar/createSidebarLanguagesSettings.py b/vrct_gui/main_window/widgets/_create_sidebar/createSidebarLanguagesSettings.py index 7561e1ae..cbe96b4e 100644 --- a/vrct_gui/main_window/widgets/_create_sidebar/createSidebarLanguagesSettings.py +++ b/vrct_gui/main_window/widgets/_create_sidebar/createSidebarLanguagesSettings.py @@ -317,4 +317,23 @@ def createSidebarLanguagesSettings(settings, main_window, view_variable): open_selectable_language_window_command=callbackOpenSelectableTargetLanguageWindow, variable=view_variable.VAR_TARGET_LANGUAGE ) - main_window.sls__box_target_language.grid(row=4, column=0, sticky="ew") \ No newline at end of file + main_window.sls__box_target_language.grid(row=4, column=0, sticky="ew") + + + + # Set Transcription ON/OFF Indicator Widgets + main_window.sls__box_your_language_mic_status__enabled = CTkLabel( + main_window.sls__box_your_language, + text=None, + height=0, + corner_radius=0, + image=CTkImage(settings.image_file.MIC_ICON_DISABLED, size=settings.uism.SLS__BOX_TRANSCRIPTION_STATUS_IMAGE_SIZE), + ) + + main_window.sls__box_target_language_speaker_status__enabled = CTkLabel( + main_window.sls__box_target_language, + text=None, + height=0, + corner_radius=0, + image=CTkImage(settings.image_file.HEADPHONES_ICON_DISABLED, size=settings.uism.SLS__BOX_TRANSCRIPTION_STATUS_IMAGE_SIZE), + ) \ No newline at end of file diff --git a/vrct_gui/ui_managers/UiScalingManager.py b/vrct_gui/ui_managers/UiScalingManager.py index b3e7f937..08782d05 100644 --- a/vrct_gui/ui_managers/UiScalingManager.py +++ b/vrct_gui/ui_managers/UiScalingManager.py @@ -86,6 +86,9 @@ class UiScalingManager(): self.main.SLS__PRESET_TAB_NUMBER_CORNER_RADIUS = self._calculateUiSize(6) self.main.SLS__PRESET_TAB_NUMBER_ADJUSTED_HEIGHT = self._calculateUiSize(36) + self.main.SLS__BOX_TRANSCRIPTION_STATUS_IMAGE_SIZE = self.dupTuple(self._calculateUiSize(14)) + + self.main.SLS__BOX_SECTION_TITLE_FONT_SIZE = self._calculateUiSize(16) self.main.SLS__BOX_SECTION_TITLE_BOTTOM_PADY = self._calculateUiSize(10) self.main.SLS__BOX_IPADX = self._calculateUiSize(10)