From bcb8d9c39480a1b04ef484f68e190f704a6464d4 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sun, 7 Jan 2024 07:43:08 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[bugfix]=20=E3=83=AF=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=81=AB=E5=8D=98?= =?UTF-8?q?=E8=AA=9E=E8=BF=BD=E5=8A=A0=E5=BE=8C=E3=80=81EntryBox=E3=81=8C?= =?UTF-8?q?=E7=A9=BA=E3=81=AB=E3=81=AA=E3=82=89=E3=81=AA=E3=81=84=E3=83=90?= =?UTF-8?q?=E3=82=B0=E4=BF=AE=E6=AD=A3=E3=80=82=20idk=20why,=20but=20in=20?= =?UTF-8?q?CTkEntry=20and=20CTkTextbox,=20the=20first=20argument=20for=20t?= =?UTF-8?q?he=20delete=20function=20is=20different.=20Otherwise,=20it=20th?= =?UTF-8?q?rows=20an=20error=20and=20doesn't=20work.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/view.py b/view.py index ef8bf6c2..546ab972 100644 --- a/view.py +++ b/view.py @@ -852,8 +852,15 @@ class View(): # Widget Control # Common + + # Note: The difference between _clearEntryBox and _clearTextBox + # idk why, but in CTkEntry and CTkTextbox, the first argument for the delete function is different. Otherwise, it throws an error. @staticmethod def _clearEntryBox(entry_widget): + entry_widget.delete(0, "end") + + @staticmethod + def _clearTextBox(entry_widget): entry_widget.delete("1.0", "end") def clearErrorMessage(self): @@ -1508,7 +1515,7 @@ class View(): return vrct_gui.entry_message_box.get('1.0', "end-1c") def clearMessageBox(self): - self._clearEntryBox(vrct_gui.entry_message_box) + self._clearTextBox(vrct_gui.entry_message_box) From caf9f87db6c72fc77d285977e855649b9cae2318 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sun, 7 Jan 2024 08:17:44 +0900 Subject: [PATCH 2/3] [Update] Config Window: add corner radius to image buttons. --- .../setting_box_containers/_SettingBoxGenerator.py | 8 +++++++- vrct_gui/ui_managers/UiScalingManager.py | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py index 263204d3..7d44a2bb 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py @@ -355,6 +355,7 @@ class _SettingBoxGenerator(): button_clicked_color=self.settings.ctm.SB__BUTTON_CLICKED_COLOR, button_image_file=self.settings.image_file.FOLDER_OPEN_ICON, button_image_size=self.settings.uism.SB__BUTTON_ICON_SIZE, + corner_radius=self.settings.uism.SB__BUTTON_CORNER_RADIUS, button_ipadxy=self.settings.uism.SB__BUTTON_IPADXY, button_command=button_command, ) @@ -941,7 +942,8 @@ class _SettingBoxGenerator(): button_enter_color=self.settings.ctm.SB__BUTTON_HOVERED_COLOR, button_clicked_color=self.settings.ctm.SB__BUTTON_CLICKED_COLOR, button_image_file=button_image, - button_image_size=self.settings.uism.SB__OPEN_CONFIG_FILE_BUTTON_ICON_SIZE, + button_image_size=self.settings.uism.SB__BUTTON_ICON_SIZE, + corner_radius=self.settings.uism.SB__BUTTON_CORNER_RADIUS, button_ipadxy=self.settings.uism.SB__OPEN_CONFIG_FILE_BUTTON_IPADXY, button_command=button_command, ) @@ -987,6 +989,7 @@ class _SettingBoxGenerator(): button_clicked_color=self.settings.ctm.SB__BUTTON_CLICKED_COLOR, button_image_file=self.settings.image_file.ARROW_LEFT.rotate(270), button_image_size=self.settings.uism.SB__BUTTON_ICON_SIZE, + corner_radius=self.settings.uism.SB__BUTTON_CORNER_RADIUS, button_ipadxy=self.settings.uism.SB__BUTTON_IPADXY, button_command=open_command, ) @@ -1001,6 +1004,7 @@ class _SettingBoxGenerator(): button_clicked_color=self.settings.ctm.SB__BUTTON_CLICKED_COLOR, button_image_file=self.settings.image_file.ARROW_LEFT.rotate(90), button_image_size=self.settings.uism.SB__BUTTON_ICON_SIZE, + corner_radius=self.settings.uism.SB__BUTTON_CORNER_RADIUS, button_ipadxy=self.settings.uism.SB__BUTTON_IPADXY, button_command=close_command, ) @@ -1216,6 +1220,7 @@ class _SettingBoxGenerator(): button_clicked_color=self.settings.ctm.SB__ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_CLICKED_BG_COLOR, button_image_file=self.settings.image_file.CANCEL_ICON, button_image_size=self.settings.uism.ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_IMG_SIZE, + corner_radius=self.settings.uism.ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_CORNER_RADIUS, button_ipadxy=self.settings.uism.ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_IPADXY, button_command=lambda _e: pressedDeleteButtonCommand(_e, delete_button, redo_button), ) @@ -1228,6 +1233,7 @@ class _SettingBoxGenerator(): button_clicked_color=self.settings.ctm.SB__ADD_AND_DELETE_ABLE_LIST__VALUES_DELETED_BUTTON_CLICKED_BG_COLOR, button_image_file=self.settings.image_file.REDO_ICON, button_image_size=self.settings.uism.ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_IMG_SIZE, + corner_radius=self.settings.uism.ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_CORNER_RADIUS, button_ipadxy=self.settings.uism.ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_IPADXY, button_command=lambda _e: pressedRedoButtonCommand(_e, delete_button, redo_button), ) diff --git a/vrct_gui/ui_managers/UiScalingManager.py b/vrct_gui/ui_managers/UiScalingManager.py index 0d9518e4..2e02b1bf 100644 --- a/vrct_gui/ui_managers/UiScalingManager.py +++ b/vrct_gui/ui_managers/UiScalingManager.py @@ -307,6 +307,7 @@ class UiScalingManager(): self.config_window.ADD_AND_DELETE_ABLE_LIST__VALUES_TEXT_IPADX = (self._calculateUiSize(8), 0) self.config_window.ADD_AND_DELETE_ABLE_LIST__VALUES_TEXT_IPADY = self._calculateUiSize(6) self.config_window.ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_IMG_SIZE = self._calculateUiSize(14) + self.config_window.ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_CORNER_RADIUS = self._calculateUiSize(4) self.config_window.ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_IPADXY = self._calculateUiSize(6) self.config_window.ADD_AND_DELETE_ABLE_LIST__VALUES_ACTION_BUTTON_PADX = (self._calculateUiSize(6), self._calculateUiSize(8)) @@ -333,9 +334,9 @@ class UiScalingManager(): self.config_window.SB__BUTTON_IPADXY = self._calculateUiSize(16) self.config_window.SB__BUTTON_ICON_SIZE = self._calculateUiSize(24) + self.config_window.SB__BUTTON_CORNER_RADIUS = self.config_window.BUTTONS_CORNER_RADIUS self.config_window.SB__OPEN_CONFIG_FILE_BUTTON_IPADXY = self._calculateUiSize(10) - self.config_window.SB__OPEN_CONFIG_FILE_BUTTON_ICON_SIZE = self._calculateUiSize(20) def _calculateUiSize(self, default_size, is_allowed_odd:bool=False, is_zero_allowed:bool=False): From 24f7823f4496754f61f6517f764aed0d24e14afb Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sun, 7 Jan 2024 08:19:40 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[bugfix]=20Word=20Filter:=20=E5=8D=98?= =?UTF-8?q?=E8=AA=9E=E5=89=8A=E9=99=A4=E6=99=82=E3=80=81=E5=8D=B3=E5=BA=A7?= =?UTF-8?q?=E3=81=AB=E8=A8=AD=E5=AE=9A=E3=81=8C=E5=8F=8D=E6=98=A0=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controller.py b/controller.py index 565fc0fa..42f17be6 100644 --- a/controller.py +++ b/controller.py @@ -593,6 +593,8 @@ def callbackDeleteMicWordFilter(value): new_input_mic_word_filter_list.remove(str(value)) config.INPUT_MIC_WORD_FILTER = new_input_mic_word_filter_list view.setLatestConfigVariable("MicMicWordFilter") + model.resetKeywordProcessor() + model.addKeywords() except Exception: print("There was no the target word in config.INPUT_MIC_WORD_FILTER")