[Chore] printToTextBox内でconfig.pyを使っていたが、そもそもconfig.pyはGUI以下では使わないとの、特にコードの移動も必要なく書き換えだけで修正
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from customtkinter import CTkFont
|
from customtkinter import CTkFont
|
||||||
from config import config
|
|
||||||
|
|
||||||
|
|
||||||
def _printToTextbox(settings, target_textbox, original_message, translated_message, tags=None):
|
def _printToTextbox(settings, target_textbox, original_message, translated_message, tags=None):
|
||||||
now_raw_data = datetime.now()
|
now_raw_data = datetime.now()
|
||||||
@@ -23,10 +21,10 @@ def _printToTextbox(settings, target_textbox, original_message, translated_messa
|
|||||||
|
|
||||||
target_textbox._textbox.tag_configure("START", spacing1=10)
|
target_textbox._textbox.tag_configure("START", spacing1=10)
|
||||||
|
|
||||||
target_textbox._textbox.tag_configure("LABEL", font=CTkFont(family=config.FONT_FAMILY, size=12, weight="normal"))
|
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=config.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=config.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=config.FONT_FAMILY, size=16, weight="normal"))
|
target_textbox._textbox.tag_configure("TRANSLATED_MESSAGE", font=CTkFont(family=settings.FONT_FAMILY, size=16, weight="normal"))
|
||||||
|
|
||||||
target_textbox.configure(state='normal')
|
target_textbox.configure(state='normal')
|
||||||
target_textbox.insert("end", f"[{tags}] ", ("START", "LABEL", tags, f"{tags}_COLOR"))
|
target_textbox.insert("end", f"[{tags}] ", ("START", "LABEL", tags, f"{tags}_COLOR"))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from types import SimpleNamespace
|
from types import SimpleNamespace
|
||||||
|
|
||||||
from customtkinter import CTk, get_appearance_mode
|
from customtkinter import CTk
|
||||||
|
|
||||||
# from window_help_and_info import ToplevelWindowInformation
|
# from window_help_and_info import ToplevelWindowInformation
|
||||||
|
|
||||||
@@ -12,8 +12,6 @@ from .main_window import createMainWindowWidgets
|
|||||||
from .config_window import ConfigWindow
|
from .config_window import ConfigWindow
|
||||||
from .ui_utils import _setDefaultActiveTab
|
from .ui_utils import _setDefaultActiveTab
|
||||||
|
|
||||||
from config import config
|
|
||||||
|
|
||||||
|
|
||||||
class VRCT_GUI(CTk):
|
class VRCT_GUI(CTk):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user