[Update] Config Window: Setting box, Font Family. アルファベット順にsortし、@(縦書き)のフォントを排除。
This commit is contained in:
9
view.py
9
view.py
@@ -135,7 +135,7 @@ class View():
|
|||||||
|
|
||||||
VAR_LABEL_FONT_FAMILY=StringVar(value="Font Family"),
|
VAR_LABEL_FONT_FAMILY=StringVar(value="Font Family"),
|
||||||
VAR_DESC_FONT_FAMILY=StringVar(value="(Default: Yu Gothic UI)"),
|
VAR_DESC_FONT_FAMILY=StringVar(value="(Default: Yu Gothic UI)"),
|
||||||
LIST_FONT_FAMILY=list(tk_font.families()),
|
LIST_FONT_FAMILY=self.getAvailableFonts(),
|
||||||
CALLBACK_SET_FONT_FAMILY=None,
|
CALLBACK_SET_FONT_FAMILY=None,
|
||||||
VAR_FONT_FAMILY=StringVar(value=config.FONT_FAMILY),
|
VAR_FONT_FAMILY=StringVar(value=config.FONT_FAMILY),
|
||||||
|
|
||||||
@@ -400,6 +400,13 @@ class View():
|
|||||||
# self._insertSampleConversationToTextbox()
|
# self._insertSampleConversationToTextbox()
|
||||||
|
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def getAvailableFonts():
|
||||||
|
available_fonts = list(tk_font.families())
|
||||||
|
available_fonts.sort()
|
||||||
|
filtered_available_fonts = list(filter(lambda x: x.startswith("@") is False, available_fonts))
|
||||||
|
return filtered_available_fonts
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def openWebPage(url:str):
|
def openWebPage(url:str):
|
||||||
webbrowser.open_new_tab(url)
|
webbrowser.open_new_tab(url)
|
||||||
|
|||||||
Reference in New Issue
Block a user