From 5d6902c1963e307e2a2ff3bc576e300a82eea718 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Mon, 6 Nov 2023 12:31:49 +0900 Subject: [PATCH 1/3] [Update] Config Window: Auto Export Message Logs. add open file(logs) button. --- controller.py | 4 ++ img/folder_open_icon.png | Bin 0 -> 703 bytes view.py | 2 + .../_SettingBoxGenerator.py | 61 ++++++++++++++++++ .../createSettingBox_Others.py | 9 ++- vrct_gui/ui_managers/Themes/_darkTheme.py | 1 + 6 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 img/folder_open_icon.png diff --git a/controller.py b/controller.py index 5e8323c3..a26e7c8e 100644 --- a/controller.py +++ b/controller.py @@ -13,6 +13,9 @@ def callbackUpdateSoftware(): def callbackRestartSoftware(): model.reStartSoftware() +def callbackFilepathLogs(): + print("callbackFilepathLogs") + # func transcription send message def sendMicMessage(message): if len(message) > 0: @@ -700,6 +703,7 @@ def createMainWindow(): common_registers={ "callback_update_software": callbackUpdateSoftware, "callback_restart_software": callbackRestartSoftware, + "callback_filepath_logs": callbackFilepathLogs, }, window_action_registers={ diff --git a/img/folder_open_icon.png b/img/folder_open_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3de75dfe934739dad971921a59a60491fcc22842 GIT binary patch literal 703 zcmV;w0zmzVP)j-RdZQ*CilB@UeIrrWZ z2gu3!zoF-wHpf{&2=TPlv>xjc5OEifQa9(O1$0ZyPNBcq17Z95) znpPV?JE`@S-BXEHKnJ;iZgK(LM4m!D+gWj4@1yRJz~a-0i1s5Z;CZs9JNOcY%kF_X z00<#kt)|u0oz`cw)BnuO6(Vw!6|nm+&N1_40AtfMcXfyM>Gqt9%v>Shd%0ZNQwn&V zTLmD9=*_xSJ2CK}ydy&;tX%+vM(;OGt=qCU+}4xl(j2hP@MX1)$Unuamd zo!G~=hv%935`b}`P1 z9gVL7I73AH8;$xWrGP)Y5z%&a?bbj0VZMy0whp&Y;Fe1fH2@F`a?J#?Fuaw@r9GuU zR)#mFKvssg2!U)2Z%P4VWO$1b08-mN>RbVVEDUc-fvgN~VPa&}@y lwsq>?%!P-yoSd8>zW^Z!E4hp1?Q#GB002ovPDHLkV1hVqK>+{& literal 0 HcmV?d00001 diff --git a/view.py b/view.py index 4f2d3ef5..3979439c 100644 --- a/view.py +++ b/view.py @@ -82,6 +82,7 @@ class View(): # Common CALLBACK_RESTART_SOFTWARE=None, CALLBACK_UPDATE_SOFTWARE=None, + CALLBACK_OPEN_FILEPATH_LOGS=None, CALLBACK_QUIT_VRCT=vrct_gui._quitVRCT, @@ -400,6 +401,7 @@ class View(): if common_registers is not None: self.view_variable.CALLBACK_UPDATE_SOFTWARE=common_registers.get("callback_update_software", None) self.view_variable.CALLBACK_RESTART_SOFTWARE=common_registers.get("callback_restart_software", None) + self.view_variable.CALLBACK_OPEN_FILEPATH_LOGS=common_registers.get("callback_filepath_logs", None) if window_action_registers is not None: 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 d9c4cebd..28e99364 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 @@ -254,6 +254,67 @@ class _SettingBoxGenerator(): + def createSettingBoxAutoExportMessageLogs( + self, + for_var_label_text, for_var_desc_text, + checkbox_attr_name, + checkbox_command, + button_command, + variable, + ): + + (setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(checkbox_attr_name, for_var_label_text, for_var_desc_text) + + + + all_wrapper = CTkFrame(setting_box_item_frame, corner_radius=0, fg_color=self.settings.ctm.SB__BG_COLOR, width=0, height=0) + all_wrapper.grid(row=1, column=0, sticky="ew") + + all_wrapper.grid_columnconfigure(1, weight=1) + + + + + button_widget = createButtonWithImage( + parent_widget=all_wrapper, + button_fg_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_COLOR, + button_enter_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_HOVERED_COLOR, + button_clicked_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_CLICKED_COLOR, + button_image_file=self.settings.image_file.FOLDER_OPEN_ICON, + button_image_size=self.settings.uism.SB__ARROW_SWITCH_BUTTON_ICON_SIZE, + button_ipadxy=self.settings.uism.SB__ARROW_SWITCH_BUTTON_IPADXY, + button_command=button_command, + ) + button_widget.grid(row=0, column=0, padx=0, sticky="w") + + + + checkbox_widget = CTkCheckBox( + all_wrapper, + text=None, + width=0, + checkbox_width=self.settings.uism.SB__CHECKBOX_SIZE, + checkbox_height=self.settings.uism.SB__CHECKBOX_SIZE, + onvalue=True, + offvalue=False, + variable=variable, + command=checkbox_command, + corner_radius=self.settings.uism.SB__CHECKBOX_CORNER_RADIUS, + border_width=self.settings.uism.SB__CHECKBOX_BORDER_WIDTH, + border_color=self.settings.ctm.SB__CHECKBOX_BORDER_COLOR, + hover_color=self.settings.ctm.SB__CHECKBOX_HOVER_COLOR, + checkmark_color=self.settings.ctm.SB__CHECKBOX_CHECKMARK_COLOR, + fg_color=self.settings.ctm.SB__CHECKBOX_CHECKED_COLOR, + ) + setattr(self.config_window, checkbox_attr_name, checkbox_widget) + + checkbox_widget.grid(row=0, column=2, sticky="e") + + return setting_box_frame + + + + def createSettingBoxSlider( diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py index 368d3edd..161e4bfc 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py @@ -5,6 +5,7 @@ from .._SettingBoxGenerator import _SettingBoxGenerator def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_variable): sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable) createSettingBoxCheckbox = sbg.createSettingBoxCheckbox + createSettingBoxAutoExportMessageLogs = sbg.createSettingBoxAutoExportMessageLogs createSettingBox_Labels = sbg.createSettingBox_Labels createSettingBoxMessageFormatEntries = sbg.createSettingBoxMessageFormatEntries @@ -19,6 +20,9 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_v def checkbox_auto_export_message_logs_callback(checkbox_box_widget): callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, checkbox_box_widget.get()) + def button_auto_export_message_logs_callback(): + callFunctionIfCallable(view_variable.CALLBACK_OPEN_FILEPATH_LOGS) + def checkbox_enable_send_message_to_vrc_callback(checkbox_box_widget): callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_SEND_MESSAGE_TO_VRC, checkbox_box_widget.get()) @@ -53,11 +57,12 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_v row+=1 - config_window.sb__auto_export_message_logs = createSettingBoxCheckbox( + config_window.sb__auto_export_message_logs = createSettingBoxAutoExportMessageLogs( for_var_label_text=view_variable.VAR_LABEL_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, for_var_desc_text=view_variable.VAR_DESC_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, checkbox_attr_name="sb__checkbox_auto_export_message_logs", - command=lambda: checkbox_auto_export_message_logs_callback(config_window.sb__checkbox_auto_export_message_logs), + checkbox_command=lambda: checkbox_auto_export_message_logs_callback(config_window.sb__checkbox_auto_export_message_logs), + button_command=lambda _e: button_auto_export_message_logs_callback(), variable=view_variable.VAR_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, ) config_window.sb__auto_export_message_logs.grid(row=row) diff --git a/vrct_gui/ui_managers/Themes/_darkTheme.py b/vrct_gui/ui_managers/Themes/_darkTheme.py index 353cb373..5ee1af0c 100644 --- a/vrct_gui/ui_managers/Themes/_darkTheme.py +++ b/vrct_gui/ui_managers/Themes/_darkTheme.py @@ -306,6 +306,7 @@ def _darkTheme(base_color): CANCEL_ICON = getImageFileFromUiUtils("cancel_icon.png"), REDO_ICON = getImageFileFromUiUtils("redo_white.png"), SWAP_ICON = getImageFileFromUiUtils("swap_icon.png"), + FOLDER_OPEN_ICON = getImageFileFromUiUtils("folder_open_icon.png"), ), ) From f21ffea568c905d5d38d56723a4649f9d8e7cecc Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Mon, 6 Nov 2023 12:54:02 +0900 Subject: [PATCH 2/3] [Update] Config Window: Advanced Settings Tab: add Open Config File. add item open file(config.json) button. --- controller.py | 4 +++ locales/en.yml | 5 +++- locales/ja.yml | 5 +++- view.py | 5 ++++ .../_SettingBoxGenerator.py | 27 +++++++++++++++++++ .../createSettingBox_AdvancedSettings.py | 16 ++++++++++- 6 files changed, 59 insertions(+), 3 deletions(-) diff --git a/controller.py b/controller.py index a26e7c8e..421330a8 100644 --- a/controller.py +++ b/controller.py @@ -16,6 +16,9 @@ def callbackRestartSoftware(): def callbackFilepathLogs(): print("callbackFilepathLogs") +def callbackFilepathConfigFile(): + print("callbackFilepathConfigFile") + # func transcription send message def sendMicMessage(message): if len(message) > 0: @@ -704,6 +707,7 @@ def createMainWindow(): "callback_update_software": callbackUpdateSoftware, "callback_restart_software": callbackRestartSoftware, "callback_filepath_logs": callbackFilepathLogs, + "callback_filepath_config_file": callbackFilepathConfigFile, }, window_action_registers={ diff --git a/locales/en.yml b/locales/en.yml index 9bce45f3..887d3a92 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -193,4 +193,7 @@ config_window: label: OSC IP Address osc_port: - label: OSC Port \ No newline at end of file + label: OSC Port + + open_config_filepath: + label: Open Config File \ No newline at end of file diff --git a/locales/ja.yml b/locales/ja.yml index c0e9cc11..313c991f 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -192,4 +192,7 @@ config_window: label: OSC IP Address osc_port: - label: OSC Port \ No newline at end of file + label: OSC Port + + open_config_filepath: + label: 設定ファイルを開く \ No newline at end of file diff --git a/view.py b/view.py index 3979439c..f7250b9f 100644 --- a/view.py +++ b/view.py @@ -83,6 +83,7 @@ class View(): CALLBACK_RESTART_SOFTWARE=None, CALLBACK_UPDATE_SOFTWARE=None, CALLBACK_OPEN_FILEPATH_LOGS=None, + CALLBACK_OPEN_FILEPATH_CONFIG_FILE=None, CALLBACK_QUIT_VRCT=vrct_gui._quitVRCT, @@ -385,6 +386,9 @@ class View(): VAR_DESC_OSC_PORT=None, CALLBACK_SET_OSC_PORT=None, VAR_OSC_PORT=StringVar(value=config.OSC_PORT), + + VAR_LABEL_OPEN_CONFIG_FILEPATH=StringVar(value=i18n.t("config_window.open_config_filepath.label")), + VAR_DESC_OPEN_CONFIG_FILEPATH=None, ) @@ -402,6 +406,7 @@ class View(): self.view_variable.CALLBACK_UPDATE_SOFTWARE=common_registers.get("callback_update_software", None) self.view_variable.CALLBACK_RESTART_SOFTWARE=common_registers.get("callback_restart_software", None) self.view_variable.CALLBACK_OPEN_FILEPATH_LOGS=common_registers.get("callback_filepath_logs", None) + self.view_variable.CALLBACK_OPEN_FILEPATH_CONFIG_FILE=common_registers.get("callback_filepath_config_file", None) if window_action_registers is not None: 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 28e99364..c08f95bc 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 @@ -740,6 +740,33 @@ class _SettingBoxGenerator(): + def createSettingBoxButtonWithImage( + self, + for_var_label_text, for_var_desc_text, + button_attr_name, + button_image, + button_command, + ): + + (setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(button_attr_name, for_var_label_text, for_var_desc_text) + + + button_with_image_widget = createButtonWithImage( + parent_widget=setting_box_item_frame, + button_fg_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_COLOR, + button_enter_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_HOVERED_COLOR, + button_clicked_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_CLICKED_COLOR, + button_image_file=button_image, + button_image_size=self.settings.uism.SB__ARROW_SWITCH_BUTTON_ICON_SIZE, + button_ipadxy=self.settings.uism.SB__ARROW_SWITCH_BUTTON_IPADXY, + button_command=button_command, + ) + button_with_image_widget.grid(row=1, column=SETTING_BOX_COLUMN, padx=self.settings.uism.SB__ARROW_SWITCH_LEFT_PADX, sticky="e") + + return setting_box_frame + + + def createSettingBoxArrowSwitch( self, diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_advanced_settings/createSettingBox_AdvancedSettings.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_advanced_settings/createSettingBox_AdvancedSettings.py index 4c6ef337..bb305ecf 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_advanced_settings/createSettingBox_AdvancedSettings.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_advanced_settings/createSettingBox_AdvancedSettings.py @@ -5,6 +5,7 @@ from .._SettingBoxGenerator import _SettingBoxGenerator def createSettingBox_AdvancedSettings(setting_box_wrapper, config_window, settings, view_variable): sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable) createSettingBoxEntry = sbg.createSettingBoxEntry + createSettingBoxButtonWithImage = sbg.createSettingBoxButtonWithImage def entry_ip_address_callback(value): @@ -13,6 +14,9 @@ def createSettingBox_AdvancedSettings(setting_box_wrapper, config_window, settin def entry_port_callback(value): callFunctionIfCallable(view_variable.CALLBACK_SET_OSC_PORT, value) + def open_config_filepath_callback(): + callFunctionIfCallable(view_variable.CALLBACK_OPEN_FILEPATH_CONFIG_FILE) + row=0 config_window.sb__ip_address = createSettingBoxEntry( for_var_label_text=view_variable.VAR_LABEL_OSC_IP_ADDRESS, @@ -34,5 +38,15 @@ def createSettingBox_AdvancedSettings(setting_box_wrapper, config_window, settin entry_bind__Any_KeyRelease=lambda value: entry_port_callback(value), entry_textvariable=view_variable.VAR_OSC_PORT, ) - config_window.sb__port.grid(row=row, pady=0) + config_window.sb__port.grid(row=row) row+=1 + + config_window.sb__open_config_filepath = createSettingBoxButtonWithImage( + for_var_label_text=view_variable.VAR_LABEL_OPEN_CONFIG_FILEPATH, + for_var_desc_text=view_variable.VAR_DESC_OPEN_CONFIG_FILEPATH, + button_attr_name="sb__button_open_config_filepath", + button_command=lambda _e: open_config_filepath_callback(), + button_image=settings.image_file.FOLDER_OPEN_ICON, + ) + config_window.sb__open_config_filepath.grid(row=row, pady=0) + row+=1 \ No newline at end of file From c8415d83704ca021ff8c6006ba56a1b2ea8a72bf Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Mon, 6 Nov 2023 13:10:55 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[Refactor]=20Config=20Window:=20=5FSettingB?= =?UTF-8?q?oxGenerator=20=E3=83=9C=E3=82=BF=E3=83=B3=E7=B3=BB=E3=82=B5?= =?UTF-8?q?=E3=82=A4=E3=82=BA=E3=81=A8=E8=89=B2=E6=8C=87=E5=AE=9A=E3=81=AE?= =?UTF-8?q?=E6=B1=8E=E7=94=A8=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_SettingBoxGenerator.py | 42 +++++++++---------- vrct_gui/ui_managers/Themes/_darkTheme.py | 9 ++-- vrct_gui/ui_managers/UiScalingManager.py | 10 +++-- 3 files changed, 31 insertions(+), 30 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 c08f95bc..cb04cf8d 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 @@ -277,12 +277,12 @@ class _SettingBoxGenerator(): button_widget = createButtonWithImage( parent_widget=all_wrapper, - button_fg_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_COLOR, - button_enter_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_HOVERED_COLOR, - button_clicked_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_CLICKED_COLOR, + button_fg_color=self.settings.ctm.SB__BUTTON_COLOR, + button_enter_color=self.settings.ctm.SB__BUTTON_HOVERED_COLOR, + 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__ARROW_SWITCH_BUTTON_ICON_SIZE, - button_ipadxy=self.settings.uism.SB__ARROW_SWITCH_BUTTON_IPADXY, + button_image_size=self.settings.uism.SB__BUTTON_ICON_SIZE, + button_ipadxy=self.settings.uism.SB__BUTTON_IPADXY, button_command=button_command, ) button_widget.grid(row=0, column=0, padx=0, sticky="w") @@ -753,15 +753,15 @@ class _SettingBoxGenerator(): button_with_image_widget = createButtonWithImage( parent_widget=setting_box_item_frame, - button_fg_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_COLOR, - button_enter_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_HOVERED_COLOR, - button_clicked_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_CLICKED_COLOR, + button_fg_color=self.settings.ctm.SB__BUTTON_COLOR, + 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__ARROW_SWITCH_BUTTON_ICON_SIZE, - button_ipadxy=self.settings.uism.SB__ARROW_SWITCH_BUTTON_IPADXY, + button_image_size=self.settings.uism.SB__OPEN_CONFIG_FILE_BUTTON_ICON_SIZE, + button_ipadxy=self.settings.uism.SB__OPEN_CONFIG_FILE_BUTTON_IPADXY, button_command=button_command, ) - button_with_image_widget.grid(row=1, column=SETTING_BOX_COLUMN, padx=self.settings.uism.SB__ARROW_SWITCH_LEFT_PADX, sticky="e") + button_with_image_widget.grid(row=1, column=SETTING_BOX_COLUMN, sticky="e") return setting_box_frame @@ -798,12 +798,12 @@ class _SettingBoxGenerator(): for_opening_button_wrapper = createButtonWithImage( parent_widget=setting_box_item_frame, - button_fg_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_COLOR, - button_enter_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_HOVERED_COLOR, - button_clicked_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_CLICKED_COLOR, + button_fg_color=self.settings.ctm.SB__BUTTON_COLOR, + button_enter_color=self.settings.ctm.SB__BUTTON_HOVERED_COLOR, + 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__ARROW_SWITCH_BUTTON_ICON_SIZE, - button_ipadxy=self.settings.uism.SB__ARROW_SWITCH_BUTTON_IPADXY, + button_image_size=self.settings.uism.SB__BUTTON_ICON_SIZE, + button_ipadxy=self.settings.uism.SB__BUTTON_IPADXY, button_command=open_command, ) for_opening_button_wrapper.grid(row=1, column=ARROW_BUTTON_COLUMN, padx=self.settings.uism.SB__ARROW_SWITCH_LEFT_PADX, sticky="e") @@ -812,12 +812,12 @@ class _SettingBoxGenerator(): for_closing_button_wrapper = createButtonWithImage( parent_widget=setting_box_item_frame, - button_fg_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_COLOR, - button_enter_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_HOVERED_COLOR, - button_clicked_color=self.settings.ctm.SB__ARROW_SWITCH_BUTTON_CLICKED_COLOR, + button_fg_color=self.settings.ctm.SB__BUTTON_COLOR, + button_enter_color=self.settings.ctm.SB__BUTTON_HOVERED_COLOR, + 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__ARROW_SWITCH_BUTTON_ICON_SIZE, - button_ipadxy=self.settings.uism.SB__ARROW_SWITCH_BUTTON_IPADXY, + button_image_size=self.settings.uism.SB__BUTTON_ICON_SIZE, + button_ipadxy=self.settings.uism.SB__BUTTON_IPADXY, button_command=close_command, ) for_closing_button_wrapper.grid(row=1, column=ARROW_BUTTON_COLUMN, padx=self.settings.uism.SB__ARROW_SWITCH_LEFT_PADX, sticky="e") diff --git a/vrct_gui/ui_managers/Themes/_darkTheme.py b/vrct_gui/ui_managers/Themes/_darkTheme.py index 5ee1af0c..e1b42ed2 100644 --- a/vrct_gui/ui_managers/Themes/_darkTheme.py +++ b/vrct_gui/ui_managers/Themes/_darkTheme.py @@ -160,6 +160,10 @@ def _darkTheme(base_color): LABELS_TEXT_DISABLED_COLOR = base_color.DARK_600_COLOR, + SB__BUTTON_COLOR = base_color.DARK_888_COLOR, + SB__BUTTON_HOVERED_COLOR = base_color.DARK_800_COLOR, + SB__BUTTON_CLICKED_COLOR = base_color.DARK_900_COLOR, + # Top bar TOP_BAR_BG_COLOR = base_color.DARK_850_COLOR, @@ -231,11 +235,6 @@ def _darkTheme(base_color): SB__PROGRESSBAR_X_SLIDER__ACTIVE_BUTTON_HOVERED_COLOR = base_color.PRIMARY_500_COLOR, SB__PROGRESSBAR_X_SLIDER__ACTIVE_BUTTON_CLICKED_COLOR = base_color.PRIMARY_800_COLOR, - - SB__ARROW_SWITCH_BUTTON_COLOR = base_color.DARK_888_COLOR, - SB__ARROW_SWITCH_BUTTON_HOVERED_COLOR = base_color.DARK_800_COLOR, - SB__ARROW_SWITCH_BUTTON_CLICKED_COLOR = base_color.DARK_900_COLOR, - SB__ADD_AND_DELETE_ABLE_LIST__ADD_BUTTON_COLOR = base_color.PRIMARY_600_COLOR, SB__ADD_AND_DELETE_ABLE_LIST__ADD_BUTTON_HOVERED_COLOR = base_color.PRIMARY_500_COLOR, SB__ADD_AND_DELETE_ABLE_LIST__ADD_BUTTON_CLICKED_COLOR = base_color.PRIMARY_700_COLOR, diff --git a/vrct_gui/ui_managers/UiScalingManager.py b/vrct_gui/ui_managers/UiScalingManager.py index 116fe9be..b3e7f937 100644 --- a/vrct_gui/ui_managers/UiScalingManager.py +++ b/vrct_gui/ui_managers/UiScalingManager.py @@ -282,10 +282,6 @@ class UiScalingManager(): self.config_window.SB__PROGRESSBAR_X_SLIDER__BUTTON_IPADXY = self._calculateUiSize(10) self.config_window.SB__PROGRESSBAR_X_SLIDER__BUTTON_ICON_SIZE = self._calculateUiSize(20) - - - self.config_window.SB__ARROW_SWITCH_BUTTON_IPADXY = self._calculateUiSize(16) - self.config_window.SB__ARROW_SWITCH_BUTTON_ICON_SIZE = self._calculateUiSize(24) self.config_window.SB__ARROW_SWITCH_DESC_FONT_SIZE = self._calculateUiSize(16) self.config_window.SB__ARROW_SWITCH_LEFT_PADX = (self._calculateUiSize(20), 0) @@ -324,6 +320,12 @@ class UiScalingManager(): self.config_window.SB__MESSAGE_FORMAT__ENTRIES_BOTTOM_PADY = (0, self._calculateUiSize(14)) + self.config_window.SB__BUTTON_IPADXY = self._calculateUiSize(16) + self.config_window.SB__BUTTON_ICON_SIZE = self._calculateUiSize(24) + + 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): size = calculateUiSize(default_size, self.SCALING_FLOAT, is_allowed_odd, is_zero_allowed)