[Update] Main Window Sidebar: 翻訳機能を使わない時は、そもそも翻訳機能のボタンを表示しないように。
音声認識処理中などのボタンdisabled時、スイッチの色をもっと無効感がでるように変更。
This commit is contained in:
6
view.py
6
view.py
@@ -884,18 +884,24 @@ class View():
|
|||||||
self.openCtranslate2WeightTypeWidget()
|
self.openCtranslate2WeightTypeWidget()
|
||||||
self.setTranslationSwitchStatus("normal", release_locked_state=True)
|
self.setTranslationSwitchStatus("normal", release_locked_state=True)
|
||||||
vrct_gui.sls__box_translation_optionmenu_wrapper.grid()
|
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.update()
|
||||||
|
|
||||||
elif state == "Disable":
|
elif state == "Disable":
|
||||||
view.closeCtranslate2WeightTypeWidget()
|
view.closeCtranslate2WeightTypeWidget()
|
||||||
view.setTranslationSwitchStatus("disabled", to_lock_state=True)
|
view.setTranslationSwitchStatus("disabled", to_lock_state=True)
|
||||||
vrct_gui.sls__box_translation_optionmenu_wrapper.grid_remove()
|
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()
|
vrct_gui.update()
|
||||||
|
|
||||||
elif state == "Restart":
|
elif state == "Restart":
|
||||||
view.setLatestCTranslate2WeightType()
|
view.setLatestCTranslate2WeightType()
|
||||||
view.setTranslationSwitchStatus("disabled", to_lock_state=True)
|
view.setTranslationSwitchStatus("disabled", to_lock_state=True)
|
||||||
vrct_gui.sls__box_translation_optionmenu_wrapper.grid()
|
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.update()
|
||||||
vrct_gui.config_window.lift()
|
vrct_gui.config_window.lift()
|
||||||
|
|||||||
@@ -28,13 +28,13 @@ def _changeMainWindowWidgetsStatus(vrct_gui, settings, view_variable, status, ta
|
|||||||
if status == "disabled":
|
if status == "disabled":
|
||||||
widget_frame.configure(cursor="")
|
widget_frame.configure(cursor="")
|
||||||
widget_label.configure(text_color=settings.ctm.SF__TEXT_DISABLED_COLOR)
|
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)
|
widget_selected_mark.configure(fg_color=settings.ctm.SF__SELECTED_MARK_DISABLE_BG_COLOR)
|
||||||
icon_file = disabled_icon_name
|
icon_file = disabled_icon_name
|
||||||
elif status == "normal":
|
elif status == "normal":
|
||||||
widget_frame.configure(cursor="hand2")
|
widget_frame.configure(cursor="hand2")
|
||||||
widget_label.configure(text_color=settings.ctm.LABELS_TEXT_COLOR)
|
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)
|
widget_selected_mark.configure(fg_color=settings.ctm.SF__SELECTED_MARK_ACTIVE_BG_COLOR)
|
||||||
icon_file = icon_name
|
icon_file = icon_name
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ def _darkTheme(base_color):
|
|||||||
SF__SWITCH_BOX_DISABLE_BG_COLOR = base_color.PRIMARY_800_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_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.
|
# It's not working because It overrode internally.
|
||||||
SF__SWITCH_BOX_BUTTON_HOVERED_COLOR = base_color.DARK_350_COLOR,
|
SF__SWITCH_BOX_BUTTON_HOVERED_COLOR = base_color.DARK_350_COLOR,
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ def _lightTheme(base_color):
|
|||||||
SF__SWITCH_BOX_DISABLE_BG_COLOR = base_color.PRIMARY_200_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_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.
|
# It's not working because It overrode internally.
|
||||||
SF__SWITCH_BOX_BUTTON_HOVERED_COLOR = base_color.LIGHT_300_COLOR,
|
SF__SWITCH_BOX_BUTTON_HOVERED_COLOR = base_color.LIGHT_300_COLOR,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user