[Update] Speaker2Chatbox: config.pyのself._ENABLE_SPEAKER2CHATBOX True/Falseによって、Speaker2Chatbox機能の有効無効切り替え。
通常はFalse: 設定画面での項目もdisabled状態になります。 Trueの場合に設定項目が開放され、On/Offの設定を可能に。 ※通常公開しない理由: 相手の発言をチャットボックスに表示できる(オウム返しのようになる)ため、迷惑目的での使用が想定でき、それをできるだけ防ぐためです。オープンソースとはいえ、ある程度抑制できると考えています。 使用者は開発者に直接相談し、config.pyのself._ENABLE_SPEAKER2CHATBOXがTrueなコードをビルドしたものを配布する予定です。
This commit is contained in:
@@ -5,10 +5,13 @@ def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, sta
|
||||
# target_names = []
|
||||
|
||||
|
||||
def disableOptionmenuWidget(target_widget):
|
||||
def disableLabelsWidgets(target_widget):
|
||||
target_widget.label_widget.configure(text_color=settings.ctm.LABELS_TEXT_DISABLED_COLOR)
|
||||
if target_widget.desc_widget is not None:
|
||||
target_widget.desc_widget.configure(text_color=settings.ctm.LABELS_TEXT_DISABLED_COLOR)
|
||||
|
||||
def disableOptionmenuWidget(target_widget):
|
||||
disableLabelsWidgets(target_widget)
|
||||
target_widget.optionmenu_label_widget.configure(text_color=settings.ctm.LABELS_TEXT_DISABLED_COLOR)
|
||||
target_widget.optionmenu_img_widget.configure(image=CTkImage(settings.image_file.ARROW_LEFT_DISABLED.rotate(90), size=settings.uism.SB__OPTIONMENU_IMG_SIZE))
|
||||
target_widget.optionmenu_box.unbindFunction()
|
||||
@@ -32,6 +35,16 @@ def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, sta
|
||||
target_widget = config_window.sb__widgets["sb__optionmenu_appearance_theme"]
|
||||
disableOptionmenuWidget(target_widget)
|
||||
|
||||
|
||||
case "sb__checkbox_enable_send_received_message_to_vrc":
|
||||
if status == "disabled":
|
||||
target_widget = config_window.sb__widgets["sb__checkbox_enable_send_received_message_to_vrc"]
|
||||
disableLabelsWidgets(target_widget)
|
||||
config_window.sb__checkbox_enable_send_received_message_to_vrc.configure(
|
||||
state="disabled",
|
||||
border_color=settings.ctm.SB__CHECKBOX_BORDER_DISABLED_COLOR
|
||||
)
|
||||
|
||||
case _:
|
||||
raise ValueError(f"No matching case for target_name: {target_name}")
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ def createSettingBox_Others_Additional(setting_box_wrapper, config_window, setti
|
||||
row=0
|
||||
config_window.sb__enable_send_received_message_to_vrc = createSettingBoxCheckbox(
|
||||
for_var_label_text=view_variable.VAR_LABEL_ENABLE_SEND_RECEIVED_MESSAGE_TO_VRC,
|
||||
# for_var_desc_text=view_variable.VAR_DESC_ENABLE_SEND_RECEIVED_MESSAGE_TO_VRC,
|
||||
for_var_desc_text=view_variable.VAR_DESC_ENABLE_SEND_RECEIVED_MESSAGE_TO_VRC,
|
||||
checkbox_attr_name="sb__checkbox_enable_send_received_message_to_vrc",
|
||||
command=lambda: checkbox_enable_send_received_message_to_vrc_callback(config_window.sb__checkbox_enable_send_received_message_to_vrc),
|
||||
variable=view_variable.VAR_ENABLE_SEND_RECEIVED_MESSAGE_TO_VRC,
|
||||
|
||||
@@ -211,6 +211,7 @@ def _darkTheme(base_color):
|
||||
SB__SWITCH_BOX_BUTTON_HOVERED_COLOR = base_color.DARK_350_COLOR,
|
||||
|
||||
SB__CHECKBOX_BORDER_COLOR = base_color.DARK_600_COLOR,
|
||||
SB__CHECKBOX_BORDER_DISABLED_COLOR = base_color.DARK_800_COLOR,
|
||||
SB__CHECKBOX_HOVER_COLOR = base_color.DARK_800_COLOR,
|
||||
SB__CHECKBOX_CHECKED_COLOR = base_color.PRIMARY_700_COLOR,
|
||||
SB__CHECKBOX_CHECKMARK_COLOR = base_color.DARK_BASIC_TEXT_COLOR,
|
||||
|
||||
@@ -204,6 +204,7 @@ def _lightTheme(base_color):
|
||||
SB__SWITCH_BOX_BUTTON_HOVERED_COLOR = base_color.LIGHT_200_COLOR,
|
||||
|
||||
SB__CHECKBOX_BORDER_COLOR = base_color.LIGHT_600_COLOR,
|
||||
SB__CHECKBOX_BORDER_DISABLED_COLOR = base_color.LIGHT_300_COLOR,
|
||||
SB__CHECKBOX_HOVER_COLOR = base_color.LIGHT_350_COLOR,
|
||||
SB__CHECKBOX_CHECKED_COLOR = base_color.PRIMARY_250_COLOR,
|
||||
SB__CHECKBOX_CHECKMARK_COLOR = base_color.LIGHT_BASIC_TEXT_COLOR,
|
||||
|
||||
Reference in New Issue
Block a user