From b0def64cf177848f7400ef26684d59ffb4ff5acc Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sat, 20 Jan 2024 18:13:18 +0900 Subject: [PATCH] =?UTF-8?q?[Update]=20Main=20Window=20Sidebar:=20=E7=BF=BB?= =?UTF-8?q?=E8=A8=B3=E6=A9=9F=E8=83=BD=E3=82=92=E4=BD=BF=E3=82=8F=E3=81=AA?= =?UTF-8?q?=E3=81=84=E6=99=82=E3=81=AF=E3=80=81=E3=81=9D=E3=82=82=E3=81=9D?= =?UTF-8?q?=E3=82=82=E7=BF=BB=E8=A8=B3=E6=A9=9F=E8=83=BD=E3=81=AE=E3=83=9C?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=97=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E3=80=82=20=E9=9F=B3?= =?UTF-8?q?=E5=A3=B0=E8=AA=8D=E8=AD=98=E5=87=A6=E7=90=86=E4=B8=AD=E3=81=AA?= =?UTF-8?q?=E3=81=A9=E3=81=AE=E3=83=9C=E3=82=BF=E3=83=B3disabled=E6=99=82?= =?UTF-8?q?=E3=80=81=E3=82=B9=E3=82=A4=E3=83=83=E3=83=81=E3=81=AE=E8=89=B2?= =?UTF-8?q?=E3=82=92=E3=82=82=E3=81=A3=E3=81=A8=E7=84=A1=E5=8A=B9=E6=84=9F?= =?UTF-8?q?=E3=81=8C=E3=81=A7=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view.py | 6 ++++++ vrct_gui/_changeMainWindowWidgetsStatus.py | 4 ++-- vrct_gui/ui_managers/Themes/_darkTheme.py | 1 + vrct_gui/ui_managers/Themes/_lightTheme.py | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/view.py b/view.py index 7c7f0020..692692e0 100644 --- a/view.py +++ b/view.py @@ -884,18 +884,24 @@ class View(): self.openCtranslate2WeightTypeWidget() self.setTranslationSwitchStatus("normal", release_locked_state=True) vrct_gui.sls__box_translation_optionmenu_wrapper.grid() + vrct_gui.compact_mode_translation_frame.grid() + vrct_gui.translation_frame.grid() vrct_gui.update() elif state == "Disable": view.closeCtranslate2WeightTypeWidget() view.setTranslationSwitchStatus("disabled", to_lock_state=True) vrct_gui.sls__box_translation_optionmenu_wrapper.grid_remove() + vrct_gui.compact_mode_translation_frame.grid_remove() + vrct_gui.translation_frame.grid_remove() vrct_gui.update() elif state == "Restart": view.setLatestCTranslate2WeightType() view.setTranslationSwitchStatus("disabled", to_lock_state=True) vrct_gui.sls__box_translation_optionmenu_wrapper.grid() + vrct_gui.compact_mode_translation_frame.grid() + vrct_gui.translation_frame.grid() vrct_gui.update() vrct_gui.config_window.lift() diff --git a/vrct_gui/_changeMainWindowWidgetsStatus.py b/vrct_gui/_changeMainWindowWidgetsStatus.py index 3a77cb32..3b6eaf74 100644 --- a/vrct_gui/_changeMainWindowWidgetsStatus.py +++ b/vrct_gui/_changeMainWindowWidgetsStatus.py @@ -28,13 +28,13 @@ def _changeMainWindowWidgetsStatus(vrct_gui, settings, view_variable, status, ta if status == "disabled": widget_frame.configure(cursor="") widget_label.configure(text_color=settings.ctm.SF__TEXT_DISABLED_COLOR) - widget_switch_box.configure(state="disabled", progress_color=settings.ctm.SF__SWITCH_BOX_DISABLE_BG_COLOR) + widget_switch_box.configure(state="disabled", progress_color=settings.ctm.SF__SWITCH_BOX_DISABLE_BG_COLOR, button_color=settings.ctm.SF__SWITCH_BOX_BUTTON_DISABLED_COLOR) widget_selected_mark.configure(fg_color=settings.ctm.SF__SELECTED_MARK_DISABLE_BG_COLOR) icon_file = disabled_icon_name elif status == "normal": widget_frame.configure(cursor="hand2") widget_label.configure(text_color=settings.ctm.LABELS_TEXT_COLOR) - widget_switch_box.configure(state="normal", progress_color=settings.ctm.SF__SWITCH_BOX_ACTIVE_BG_COLOR) + widget_switch_box.configure(state="normal", progress_color=settings.ctm.SF__SWITCH_BOX_ACTIVE_BG_COLOR, button_color=settings.ctm.SF__SWITCH_BOX_BUTTON_COLOR) widget_selected_mark.configure(fg_color=settings.ctm.SF__SELECTED_MARK_ACTIVE_BG_COLOR) icon_file = icon_name diff --git a/vrct_gui/ui_managers/Themes/_darkTheme.py b/vrct_gui/ui_managers/Themes/_darkTheme.py index 15721fb8..8442b6bb 100644 --- a/vrct_gui/ui_managers/Themes/_darkTheme.py +++ b/vrct_gui/ui_managers/Themes/_darkTheme.py @@ -58,6 +58,7 @@ def _darkTheme(base_color): SF__SWITCH_BOX_DISABLE_BG_COLOR = base_color.PRIMARY_800_COLOR, SF__SWITCH_BOX_BUTTON_COLOR = base_color.DARK_400_COLOR, + SF__SWITCH_BOX_BUTTON_DISABLED_COLOR = base_color.DARK_600_COLOR, # It's not working because It overrode internally. SF__SWITCH_BOX_BUTTON_HOVERED_COLOR = base_color.DARK_350_COLOR, diff --git a/vrct_gui/ui_managers/Themes/_lightTheme.py b/vrct_gui/ui_managers/Themes/_lightTheme.py index 2261386e..8d2ff33b 100644 --- a/vrct_gui/ui_managers/Themes/_lightTheme.py +++ b/vrct_gui/ui_managers/Themes/_lightTheme.py @@ -58,6 +58,7 @@ def _lightTheme(base_color): SF__SWITCH_BOX_DISABLE_BG_COLOR = base_color.PRIMARY_200_COLOR, SF__SWITCH_BOX_BUTTON_COLOR = base_color.LIGHT_150_COLOR, + SF__SWITCH_BOX_BUTTON_DISABLED_COLOR = base_color.LIGHT_300_COLOR, # It's not working because It overrode internally. SF__SWITCH_BOX_BUTTON_HOVERED_COLOR = base_color.LIGHT_300_COLOR,