[Update] Main Window: Message Box. メッセージ入力欄のサイズを変更できるように。厳密な計算はしてません。

【見た目への影響大】デフォルトのチャット入力欄を少し大きくしました。(もちろん変更できる)
テキストボックスとの比率としているので、Windowサイズを変更すると、それに合わせて可変します。
CTkEntryからCTkTextboxに変更しました。プレースホルダーの使用が厳しくなったので廃止しました。最小にしても、入力中の位置が中央にならないなど、デザインが若干崩れましたが許容しました。
This commit is contained in:
Sakamoto Shiina
2023-12-29 01:24:54 +09:00
parent 5e16d319e3
commit 7c23adfc24
10 changed files with 85 additions and 15 deletions

View File

@@ -214,7 +214,7 @@ def sendChatMessage(message):
if config.ENABLE_AUTO_CLEAR_MESSAGE_BOX is True:
view.clearMessageBox()
def messageBoxPressKeyEnter(e):
def messageBoxPressKeyEnter():
model.oscStopSendTyping()
message = view.getTextFromMessageBox()
sendChatMessage(message)
@@ -403,6 +403,11 @@ def callbackSetTextboxUiScaling(value):
config.TEXTBOX_UI_SCALING = int(value)
view.setMainWindowTextboxUiSize(config.TEXTBOX_UI_SCALING/100)
def callbackSetMessageBoxRatio(value):
print("callbackSetMessageBoxRatio", int(value))
config.MESSAGE_BOX_RATIO = int(value)
view.setMainWindowMessageBoxRatio(config.MESSAGE_BOX_RATIO)
def callbackSetFontFamily(value):
print("callbackSetFontFamily", value)
config.FONT_FAMILY = value
@@ -836,6 +841,7 @@ def createMainWindow():
"callback_set_appearance": callbackSetAppearance,
"callback_set_ui_scaling": callbackSetUiScaling,
"callback_set_textbox_ui_scaling": callbackSetTextboxUiScaling,
"callback_set_message_box_ratio": callbackSetMessageBoxRatio,
"callback_set_font_family": callbackSetFontFamily,
"callback_set_ui_language": callbackSetUiLanguage,