[Update] Main Window: メッセージ送信ボタンの追加。

設定項目で非表示、表示、表示しつつメッセージ入力欄でのエンターキー送信を無効 を選択可能に。

デフォルトが表示の理由: メッセージ入力欄のプレースホルダーが使えなくなり、初見でどこに入力すればいいのか分かりにくくなったので、横に送信ボタンが付くことにより、よくあるUIとなり、メッセージ入力欄っぽくなる。

その他要らないコードの削除や、corner radius指定し忘れなどの修正あり。
This commit is contained in:
Sakamoto Shiina
2024-01-07 03:30:46 +09:00
parent a5eb0a874f
commit 5128fa590c
16 changed files with 258 additions and 14 deletions

View File

@@ -3,7 +3,7 @@ hold_state_list=[]
def _changeMainWindowWidgetsStatus(vrct_gui, settings, view_variable, status, target_names:list, to_hold_state:bool=False):
global hold_state_list
if target_names == "All":
target_names = ["translation_switch", "transcription_send_switch", "transcription_receive_switch", "foreground_switch", "quick_language_settings", "config_button", "minimize_sidebar_button", "entry_message_box"]
target_names = ["translation_switch", "transcription_send_switch", "transcription_receive_switch", "foreground_switch", "quick_language_settings", "config_button", "minimize_sidebar_button", "entry_message_box", "send_message_button"]
for item in hold_state_list:
@@ -141,13 +141,17 @@ def _changeMainWindowWidgetsStatus(vrct_gui, settings, view_variable, status, ta
case "entry_message_box":
if status == "disabled":
pass
vrct_gui.entry_message_box.configure(state="disabled", text_color=settings.ctm.TEXTBOX_ENTRY_TEXT_DISABLED_COLOR)
elif status == "normal":
pass
vrct_gui.entry_message_box.configure(state="normal", text_color=settings.ctm.TEXTBOX_ENTRY_TEXT_COLOR)
case "send_message_button":
if status == "disabled":
vrct_gui.main_send_message_button__disabled.grid()
elif status == "normal":
vrct_gui.main_send_message_button__disabled.grid_remove()
case _:
raise ValueError(f"No matching case for target_name: {target_name}")