From 6af238b754f8e5df150cd97a32b342984e5d5303 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Thu, 14 Sep 2023 04:13:11 +0900 Subject: [PATCH 1/3] [Chore] Config Window: change the config window title to Settings for the production env. --- vrct_gui/config_window/ConfigWindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrct_gui/config_window/ConfigWindow.py b/vrct_gui/config_window/ConfigWindow.py index cbfcea6e..8e0a3155 100644 --- a/vrct_gui/config_window/ConfigWindow.py +++ b/vrct_gui/config_window/ConfigWindow.py @@ -13,7 +13,7 @@ class ConfigWindow(CTkToplevel): # configure window self.after(200, lambda: self.iconbitmap(getImagePath("vrct_logo_mark_black.ico"))) - self.title("test config_window.py") + self.title("Settings") self.geometry(f"{1080}x{680}") From f27e4985cddcf435da9ee7c79be0b69621a5955b Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Thu, 14 Sep 2023 05:13:47 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[Refactor]=20Main=20Window:=20=5FprintToTex?= =?UTF-8?q?tbox.=20textbox=E3=81=B8=E3=81=AE=E5=87=BA=E5=8A=9B=E9=96=A2?= =?UTF-8?q?=E6=95=B0=E3=81=AE=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF?= =?UTF-8?q?=E3=83=AA=E3=83=B3=E3=82=B02=20textbox=20widget=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E3=82=92=5FprintToTextbox=E9=96=A2=E6=95=B0=E5=86=85?= =?UTF-8?q?=E3=81=A7=E8=A1=8C=E3=81=86=E3=82=88=E3=81=86=E3=81=AB=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vrct_gui/_printToTextbox.py | 15 ++++++++++++++- vrct_gui/vrct_gui.py | 15 ++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/vrct_gui/_printToTextbox.py b/vrct_gui/_printToTextbox.py index 9becc64d..41258793 100644 --- a/vrct_gui/_printToTextbox.py +++ b/vrct_gui/_printToTextbox.py @@ -1,7 +1,20 @@ from datetime import datetime from customtkinter import CTkFont -def _printToTextbox(settings, target_textbox, original_message=None, translated_message=None, tags=None): +def _printToTextbox(vrct_gui, settings, target_type, original_message=None, translated_message=None, tags=None): + match (target_type): + case "ALL": + target_textbox = vrct_gui.textbox_all + case "INFO": + target_textbox = vrct_gui.textbox_system + case "SEND": + target_textbox = vrct_gui.textbox_sent + case "RECEIVE": + target_textbox = vrct_gui.textbox_received + case (_): + raise ValueError(f"No matching case for target_type: {target_type}") + + now_raw_data = datetime.now() now = now_raw_data.strftime('%H:%M:%S') now_hm = now_raw_data.strftime('%H:%M') diff --git a/vrct_gui/vrct_gui.py b/vrct_gui/vrct_gui.py index f525ff4a..f181115f 100644 --- a/vrct_gui/vrct_gui.py +++ b/vrct_gui/vrct_gui.py @@ -126,26 +126,19 @@ class VRCT_GUI(CTk): ) def printToTextbox(self, target_type, original_message=None, translated_message=None): - match (target_type): - case "INFO": - target_textbox = self.textbox_system - case "SEND": - target_textbox = self.textbox_sent - case "RECEIVE": - target_textbox = self.textbox_received - case (_): - raise ValueError(f"No matching case for target_type: {target_type}") _printToTextbox( + vrct_gui=self, settings=self.settings.main, - target_textbox=target_textbox, + target_type=target_type, original_message=original_message, translated_message=translated_message, tags=target_type, ) # To automatically print the same log to the textbox_all widget as well. _printToTextbox( + vrct_gui=self, settings=self.settings.main, - target_textbox=self.textbox_all, + target_type="ALL", original_message=original_message, translated_message=translated_message, tags=target_type, From cbef891fe8e17c6fd788ca893e5059a4c8a08363 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Fri, 15 Sep 2023 09:51:41 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[Update]=20Main=20Window:=20Textbox=20?= =?UTF-8?q?=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3=E5=A4=A7=E5=B9=85=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E3=80=82=E3=83=86=E3=82=B9=E3=83=88=E7=94=A8or?= =?UTF-8?q?=E4=BB=8A=E5=BE=8C=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=8C?= =?UTF-8?q?=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3=E3=82=AB=E3=82=B9=E3=82=BF?= =?UTF-8?q?=E3=83=A0=E8=A8=AD=E5=AE=9A=E3=81=99=E3=82=8B=E9=9A=9B=E3=81=AB?= =?UTF-8?q?=E4=BD=BF=E3=81=88=E3=82=8B=E3=82=B5=E3=83=B3=E3=83=97=E3=83=AB?= =?UTF-8?q?=E3=81=A8=E3=81=97=E3=81=A6=E4=BC=9A=E8=A9=B1=E3=82=92=E6=8C=BF?= =?UTF-8?q?=E5=85=A5=E3=81=99=E3=82=8B=E9=96=A2=E6=95=B0=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view.py | 134 +++++++++++++++++- vrct_gui/_printToTextbox.py | 130 +++++++++++++---- .../main_window/widgets/create_textbox.py | 2 +- vrct_gui/ui_managers/ColorThemeManager.py | 8 ++ vrct_gui/vrct_gui.py | 12 +- 5 files changed, 239 insertions(+), 47 deletions(-) diff --git a/view.py b/view.py index e7f72a0e..d1b8d688 100644 --- a/view.py +++ b/view.py @@ -350,6 +350,7 @@ class View(): self.view_variable.CALLBACK_SET_OSC_IP_ADDRESS = config_window_registers.get("callback_set_osc_ip_address", None) self.view_variable.CALLBACK_SET_OSC_PORT = config_window_registers.get("callback_set_osc_port", None) + # self._insertSampleConversationToTextbox() @@ -438,22 +439,23 @@ class View(): @staticmethod def _printToTextbox_Info(info_message): vrct_gui.printToTextbox( - target_type="INFO", + target_type="SYSTEM", original_message=info_message, - translated_message="", + # translated_message="", ) - def printToTextbox_SentMessage(self, original_message, translated_message): - self._printToTextbox_Sent(original_message, translated_message) + def printToTextbox_SentMessage(self, original_message, translated_message, actual_sent_message=None): + self._printToTextbox_Sent(original_message, translated_message, actual_sent_message) @staticmethod - def _printToTextbox_Sent(original_message, translated_message): + def _printToTextbox_Sent(original_message, translated_message, actual_sent_message=None): vrct_gui.printToTextbox( - target_type="SEND", + target_type="SENT", original_message=original_message, translated_message=translated_message, + actual_sent_message=actual_sent_message, ) @@ -463,7 +465,7 @@ class View(): @staticmethod def _printToTextbox_Received(original_message, translated_message): vrct_gui.printToTextbox( - target_type="RECEIVE", + target_type="RECEIVED", original_message=original_message, translated_message=translated_message, ) @@ -626,4 +628,122 @@ class View(): + # These conversation is generated by ChatGPT + def _insertSampleConversationToTextbox(self): + + self.printToTextbox_enableTranscriptionSend() + self.printToTextbox_enableTranscriptionReceive() + + conversation_data_without_translation = [ + { + "me": "おはよう。", + }, + { + "me": "おはよう。", + "target": "やぁ。", + }, + { + "me": "今日の天気はどうかな?", + "target": "天気予報を見てないけど、晴れるといいね。", + }, + { + "me": "そうだね。昨日は雨だったから。", + "target": "それで、今日の予定は?", + }, + ] + + for data in conversation_data_without_translation: + if data.get("me", None) is not None: + self.printToTextbox_SentMessage(data.get("me", None), data.get("me_t", None)) + if data.get("target", None) is not None: + self.printToTextbox_ReceivedMessage(data.get("target", None), data.get("target_t", None)) + + self.printToTextbox_enableTranslation() + + conversation_data = [ + { + "me": "I have work in the morning, but I'm meeting friends for dinner in the evening.", + "me_t": "아침에 일이 있지만 저녁에 친구들과 만나 저녁 식사할 예정이에요.", + "target": "재미있어 보여요! 무엇을 먹을 예정이에요?", + "target_t": "Sounds fun! What are you planning to eat?" + }, + { + "me": "We're going to an Italian restaurant, and I'm going to have pizza.", + "me_t": "우리는 이탈리안 레스토랑에 가서 피자를 먹을 거에요.", + "target": "그걸 듣자마자 배가 고파져요. 언젠가 함께하고 싶어요.", + "target_t": "Just hearing that makes me hungry. I'd love to join you sometime." + }, + { + "me": "Let's plan it for next time!", + "me_t": "다음 번에 계획해 봐요!", + "target": "그래요!", + "target_t": "Sure!" + }, + { + "me": "When would be a good time for you?", + "me_t": "너에게 언제가 좋을까?", + "target": "나는 주말이 가장 좋을 것 같아요. 토요일은 어때요?", + "target_t": "I think the weekend works best for me. How about Saturday?" + }, + { + "me": "Saturday sounds perfect. What time would be convenient?", + "me_t": "토요일이 완벽해 보여. 편한 시간은 언제인가요?", + "target": "저는 저녁이 괜찮아요. 7시쯤 괜찮을까요?", + "target_t": "Evening works for me. Is around 7 PM okay?" + }, + { + "me": "7 PM works great. Do you have any preferences for food other than Italian?", + "me_t": "7시가 아주 적당해. 이탈리안 음식 이외에 어떤 음식을 좋아하세요?", + "target": "특별한 선호도는 없어요. 무엇이든 괜찮아요. 추천 디저트가 있다면 알려주세요.", + "target_t": "I don't have any particular preferences, so anything is fine. If there's a recommended dessert, let me know." + }, + + + { + "me": "朝は仕事があるけど、夜は友達と食事に行く予定だよ。", + "me_t": "I have work in the morning, but I'm meeting friends for dinner in the evening.", + "target": "Sounds fun! What are you planning to eat?", + "target_t": "楽しそう!何を食べる予定?", + }, + { + "me": "イタリアンレストランに行って、ピザを食べるつもりだよ。", + "me_t": "We're going to an Italian restaurant, and I'm going to have pizza.", + "target": "Just hearing that makes me hungry. I'd love to join you sometime.", + "target_t": "それ聞いただけでおなかすいたよ。私も一緒に行きたいな。", + }, + { + "me": "次回にぜひ一緒に行こう!", + "me_t": "Let's plan it for next time!", + "target": "Sure!", + "target_t": "そうだね!", + }, + { + "me": "次回はいつがいいかな?", + "me_t": "When would be a good time for you?", + "target": "I think the weekend works best for me. How about Saturday?", + "target_t": "私は週末が一番いいかな。土曜日はどう?" + }, + { + "me": "土曜日はちょうどいいね。何時ごろが良いかな?", + "me_t": "Saturday sounds perfect. What time would be convenient?", + "target": "Evening works for me. Is around 7 PM okay?", + "target_t": "夜がいいかな。7時くらいからがちょうど良いかな。" + }, + { + "me": "7時からはちょうどいいよ。イタリアン以外の食べ物について何か好みがある?", + "me_t": "7 PM works great. Do you have any preferences for food other than Italian?", + "target": "I don't have any particular preferences, so anything is fine. If there's a recommended dessert, let me know.", + "target_t": "特に好みはないから、何でも大丈夫。おすすめのデザートがあれば教えてね。" + }, + ] + for data in conversation_data: + if data.get("me", None) is not None: + # actual_sent_message = config.MESSAGE_FORMAT.replace("[message]", data.get("me", None)) + # actual_sent_message = actual_sent_message.replace("[translation]", data.get("me_t", None)) + self.printToTextbox_SentMessage(data.get("me", None), data.get("me_t", None)) + # self.printToTextbox_SentMessage(data.get("me", None), data.get("me_t", None), actual_sent_message) + if data.get("target", None) is not None: + self.printToTextbox_ReceivedMessage(data.get("target", None), data.get("target_t", None)) + + view = View() \ No newline at end of file diff --git a/vrct_gui/_printToTextbox.py b/vrct_gui/_printToTextbox.py index 41258793..8854071f 100644 --- a/vrct_gui/_printToTextbox.py +++ b/vrct_gui/_printToTextbox.py @@ -1,48 +1,120 @@ from datetime import datetime from customtkinter import CTkFont -def _printToTextbox(vrct_gui, settings, target_type, original_message=None, translated_message=None, tags=None): +def _printToTextbox(vrct_gui, settings, target_type, original_message=None, translated_message=None, actual_sent_message=None, tags=None, disable_print_to_textbox_all:bool=False): + now_raw_data = datetime.now() + # now = now_raw_data.strftime("%H:%M:%S") + now_hm = now_raw_data.strftime("%H:%M") + # set target textbox widget + + is_only_one_message = True if original_message is None or translated_message is None or translated_message == "" else False + match (target_type): - case "ALL": - target_textbox = vrct_gui.textbox_all - case "INFO": + case "SYSTEM": target_textbox = vrct_gui.textbox_system - case "SEND": + case "SENT": target_textbox = vrct_gui.textbox_sent - case "RECEIVE": + case "RECEIVED": target_textbox = vrct_gui.textbox_received case (_): raise ValueError(f"No matching case for target_type: {target_type}") - now_raw_data = datetime.now() - now = now_raw_data.strftime('%H:%M:%S') - now_hm = now_raw_data.strftime('%H:%M') + def printEachTextbox(target_textbox): + target_textbox.tag_config("JUSTIFY_CENTER", justify="center") + target_textbox.tag_config("JUSTIFY_RIGHT", justify="right") + target_textbox.tag_config("JUSTIFY_LEFT", justify="left") - target_textbox.tag_config("NORMAL_TEXT", foreground=settings.ctm.TEXTBOX_TEXT_COLOR) + # common tag settings + # target_textbox._textbox.tag_configure("START", spacing1=16) + target_textbox._textbox.tag_configure("LABEL", font=CTkFont(family=settings.FONT_FAMILY, size=12, weight="normal")) + target_textbox._textbox.tag_configure("TIMESTAMP", font=CTkFont(family=settings.FONT_FAMILY, size=12, weight="normal"), foreground=settings.ctm.TEXTBOX_TIMESTAMP_TEXT_COLOR) + target_textbox._textbox.tag_configure("SECONDARY_TEXT_FONT", font=CTkFont(family=settings.FONT_FAMILY, size=12, weight="normal")) + target_textbox._textbox.tag_configure("MAIN_TEXT_FONT", font=CTkFont(family=settings.FONT_FAMILY, size=16, weight="normal")) - target_textbox.tag_config("ERROR", foreground="#FF0000") + # System Tag Settings + target_textbox.tag_config("SYSTEM_FOR_FIRST_INSERT", spacing1=16) + target_textbox.tag_config("SYSTEM_TAG", foreground=settings.ctm.TEXTBOX_SYSTEM_TAG_TEXT_COLOR) + target_textbox.tag_config("SYSTEM_TEXT", foreground=settings.ctm.TEXTBOX_TEXT_SUB_COLOR) + target_textbox._textbox.tag_configure("SYSTEM_TEXT_FONT", font=CTkFont(family=settings.FONT_FAMILY, size=12, weight="normal")) - target_textbox.tag_config("INFO", justify="center") - target_textbox.tag_config("INFO_COLOR", foreground="#1BFF00") + # Sent Tag Settings + target_textbox.tag_config("SENT_FOR_FIRST_INSERT", spacing1=16) + target_textbox.tag_config("SENT_TAG", foreground=settings.ctm.TEXTBOX_SENT_TAG_TEXT_COLOR) + target_textbox.tag_config("SENT_TEXT", foreground=settings.ctm.TEXTBOX_TEXT_COLOR) + target_textbox.tag_config("SENT_SUB_TEXT", foreground=settings.ctm.TEXTBOX_TEXT_SUB_COLOR) + target_textbox._textbox.tag_configure("SENT_MAIN_TEXT_FONT", font=CTkFont(family=settings.FONT_FAMILY, size=16, weight="normal")) + target_textbox._textbox.tag_configure("SENT_SECONDARY_TEXT_FONT", font=CTkFont(family=settings.FONT_FAMILY, size=12, weight="normal")) - target_textbox.tag_config("SEND", justify="left") - target_textbox.tag_config("SEND_COLOR", foreground="#0378e2") + # Received Tag Settings + target_textbox.tag_config("RECEIVED_FOR_FIRST_INSERT", spacing1=16) + target_textbox.tag_config("RECEIVED_TAG", foreground=settings.ctm.TEXTBOX_RECEIVED_TAG_TEXT_COLOR) + target_textbox.tag_config("RECEIVED_TEXT", foreground=settings.ctm.TEXTBOX_TEXT_COLOR) + target_textbox.tag_config("RECEIVED_SUB_TEXT", foreground=settings.ctm.TEXTBOX_TEXT_SUB_COLOR) + target_textbox._textbox.tag_configure("RECEIVED_MAIN_TEXT_FONT", font=CTkFont(family=settings.FONT_FAMILY, size=16, weight="normal")) + target_textbox._textbox.tag_configure("RECEIVED_SECONDARY_TEXT_FONT", font=CTkFont(family=settings.FONT_FAMILY, size=12, weight="normal")) - target_textbox.tag_config("RECEIVE", justify="left") - target_textbox.tag_config("RECEIVE_COLOR", foreground="#ffa500") + FAKE_MARGIN = " " + # insert + target_textbox.configure(state="normal") + target_textbox.insert("end", "\n") + match (target_type): + case "SYSTEM": + target_textbox.insert("end", "System", ("SYSTEM_TAG", "SYSTEM_FOR_FIRST_INSERT", "JUSTIFY_CENTER")) + target_textbox.insert("end", FAKE_MARGIN+original_message+FAKE_MARGIN, ("SYSTEM_TEXT", "SYSTEM_TEXT_FONT", "JUSTIFY_CENTER")) + target_textbox.insert("end", now_hm, ("TIMESTAMP", "JUSTIFY_CENTER")) - target_textbox._textbox.tag_configure("START", spacing1=10) + case "SENT": + target_textbox.insert("end", now_hm, ("TIMESTAMP", "SENT_FOR_FIRST_INSERT", "JUSTIFY_RIGHT")) + target_textbox.insert("end", FAKE_MARGIN+"Sent", ("SENT_TAG")) + target_textbox.insert("end", "\n") + if is_only_one_message is False: + target_textbox.insert("end", original_message, ("SENT_SUB_TEXT", "SENT_SECONDARY_TEXT_FONT", "JUSTIFY_RIGHT")) + target_textbox.insert("end", "\n") + target_textbox.insert("end", translated_message, ("SENT_TEXT", "SENT_MAIN_TEXT_FONT", "JUSTIFY_RIGHT")) + # _actual_sent_message = "" if actual_sent_message is None else actual_sent_message + # target_textbox.insert("end", _actual_sent_message, ("SENT_TEXT", "SENT_MAIN_TEXT_FONT", "JUSTIFY_RIGHT")) + else: + target_textbox.insert("end", original_message, ("SENT_TEXT", "SENT_MAIN_TEXT_FONT", "JUSTIFY_RIGHT")) - target_textbox._textbox.tag_configure("LABEL", font=CTkFont(family=settings.FONT_FAMILY, size=12, weight="normal")) - target_textbox._textbox.tag_configure("TIMESTAMP", font=CTkFont(family=settings.FONT_FAMILY, size=12, weight="normal")) - target_textbox._textbox.tag_configure("ORIGINAL_MESSAGE", font=CTkFont(family=settings.FONT_FAMILY, size=12, weight="normal")) - target_textbox._textbox.tag_configure("TRANSLATED_MESSAGE", font=CTkFont(family=settings.FONT_FAMILY, size=16, weight="normal")) + case "RECEIVED": + target_textbox.insert("end", "Received", ("RECEIVED_TAG", "RECEIVED_FOR_FIRST_INSERT", "JUSTIFY_LEFT")) + target_textbox.insert("end", FAKE_MARGIN+now_hm, ("TIMESTAMP")) + if is_only_one_message is False: + target_textbox.insert("end", "\n") + target_textbox.insert("end", original_message, ("RECEIVED_SUB_TEXT", "RECEIVED_SECONDARY_TEXT_FONT")) + target_textbox.insert("end", "\n") + target_textbox.insert("end", translated_message, ("RECEIVED_TEXT", "RECEIVED_MAIN_TEXT_FONT", "JUSTIFY_LEFT")) + else: + target_textbox.insert("end", "\n") + target_textbox.insert("end", original_message, ("RECEIVED_TEXT", "RECEIVED_MAIN_TEXT_FONT", "JUSTIFY_LEFT")) - target_textbox.configure(state='normal') - target_textbox.insert("end", f"[{tags}] ", ("START", "LABEL", tags, f"{tags}_COLOR")) - target_textbox.insert("end", f"{now_hm} ", ("TIMESTAMP", tags)) - target_textbox.insert("end", f"{original_message}\n", ("ORIGINAL_MESSAGE", "NORMAL_TEXT", tags)) - target_textbox.insert("end", f"{translated_message}\n", ("TRANSLATED_MESSAGE", "NORMAL_TEXT", tags)) - target_textbox.configure(state='disabled') - target_textbox.see("end") \ No newline at end of file + target_textbox.configure(state="disabled") + target_textbox.see("end") + + printEachTextbox(target_textbox) + + # To automatically print the same log to the textbox_all widget as well. + if disable_print_to_textbox_all is not True: printEachTextbox(vrct_gui.textbox_all) + + + + # target_textbox.tag_config("ERROR", foreground="#FF0000") + + # target_textbox.tag_config("SYSTEM", justify="center") + # target_textbox.tag_config("SYSTEM_TAG", foreground="#1BFF00") + + # target_textbox.tag_config("SENT", justify="left") + # target_textbox.tag_config("SENT_COLOR", foreground="#0378e2") + + # target_textbox.tag_config("RECEIVED", justify="left") + # target_textbox.tag_config("RECEIVED_COLOR", foreground="#ffa500") + + + # target_textbox.configure(state="normal") + # target_textbox.insert("end", f"[{tags}] ", ("START", "LABEL", tags, f"{tags}_COLOR")) + # target_textbox.insert("end", f"{now_hm} ", ("TIMESTAMP", tags)) + # target_textbox.insert("end", f"{original_message}\n", ("SECONDARY_TEXT_FONT", "MAIN_TEXT_COLOR", tags)) + # target_textbox.insert("end", f"{translated_message}\n", ("MAIN_TEXT_FONT", "MAIN_TEXT_COLOR", tags)) + # target_textbox.configure(state="disabled") + # target_textbox.see("end") \ No newline at end of file diff --git a/vrct_gui/main_window/widgets/create_textbox.py b/vrct_gui/main_window/widgets/create_textbox.py index 14a5ba5f..b47d7ac0 100644 --- a/vrct_gui/main_window/widgets/create_textbox.py +++ b/vrct_gui/main_window/widgets/create_textbox.py @@ -145,12 +145,12 @@ def createTextbox(settings, main_window, view_variable): corner_radius=settings.uism.TEXTBOX_CORNER_RADIUS, fg_color=settings.ctm.TEXTBOX_BG_COLOR, text_color="lime", # Textbox's text_color is set when printing. so this is for prevent from non-setting text_color like the gloves used in food factories are blue. + wrap="word", )) textbox_widget = getattr(main_window, textbox_setting["textbox_attr_name"]) textbox_widget.grid(row=0, column=0, padx=settings.uism.TEXTBOX_PADX, pady=0, sticky="nsew") textbox_widget.grid_remove() textbox_widget.configure(state="disabled") - # print_textbox(main_window, textbox_widget, "send", textbox_setting["textbox_attr_name"], "SEND") column+=1 diff --git a/vrct_gui/ui_managers/ColorThemeManager.py b/vrct_gui/ui_managers/ColorThemeManager.py index 2f980de4..f0e5c6d1 100644 --- a/vrct_gui/ui_managers/ColorThemeManager.py +++ b/vrct_gui/ui_managers/ColorThemeManager.py @@ -38,6 +38,7 @@ class ColorThemeManager(): self.DARK_200_COLOR = "#f1f2f6" self.DARK_300_COLOR = "#e9eaee" self.DARK_400_COLOR = "#c7c8cc" + self.DARK_450_COLOR = "#b8b9bd" self.DARK_500_COLOR = "#a9aaae" self.DARK_600_COLOR = "#7f8084" self.DARK_700_COLOR = "#6a6c6f" @@ -95,6 +96,13 @@ class ColorThemeManager(): self.main.TEXTBOX_BG_COLOR = self.DARK_900_COLOR self.main.TEXTBOX_TEXT_COLOR = self.main.BASIC_TEXT_COLOR + self.main.TEXTBOX_TEXT_SUB_COLOR = self.DARK_450_COLOR + self.main.TEXTBOX_SYSTEM_TAG_TEXT_COLOR = self.PRIMARY_300_COLOR + self.main.TEXTBOX_SENT_TAG_TEXT_COLOR = "#6197b4" + self.main.TEXTBOX_RECEIVED_TAG_TEXT_COLOR = "#a861b4" + self.main.TEXTBOX_ERROR_TAG_TEXT_COLOR = "#c27583" + self.main.TEXTBOX_TIMESTAMP_TEXT_COLOR = self.DARK_600_COLOR + self.main.TEXTBOX_TAB_BG_PASSIVE_COLOR = self.DARK_850_COLOR self.main.TEXTBOX_TAB_BG_ACTIVE_COLOR = self.main.TEXTBOX_BG_COLOR self.main.TEXTBOX_TAB_BG_HOVERED_COLOR = self.DARK_800_COLOR diff --git a/vrct_gui/vrct_gui.py b/vrct_gui/vrct_gui.py index f181115f..ea23f65b 100644 --- a/vrct_gui/vrct_gui.py +++ b/vrct_gui/vrct_gui.py @@ -125,22 +125,14 @@ class VRCT_GUI(CTk): target_names=target_names, ) - def printToTextbox(self, target_type, original_message=None, translated_message=None): + def printToTextbox(self, target_type, original_message=None, translated_message=None, actual_sent_message=None): _printToTextbox( vrct_gui=self, settings=self.settings.main, target_type=target_type, original_message=original_message, translated_message=translated_message, - tags=target_type, - ) - # To automatically print the same log to the textbox_all widget as well. - _printToTextbox( - vrct_gui=self, - settings=self.settings.main, - target_type="ALL", - original_message=original_message, - translated_message=translated_message, + actual_sent_message=actual_sent_message, tags=target_type, )