Conditions | 4 |
Total Lines | 27 |
Code Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import platform |
||
19 | def __init__(self, locale_var, master=None): |
||
20 | super().__init__(master) |
||
21 | self.dic = i18n.initialize(locale_var) |
||
22 | self.TREE_FOLDER = [ |
||
23 | ["data/character", self.dic.get_dict("Character")], |
||
24 | ["data/occupation", self.dic.get_dict("Occupation")], |
||
25 | ["data/space", self.dic.get_dict("Space")], |
||
26 | ["data/event", self.dic.get_dict("Event")], |
||
27 | ["data/image", self.dic.get_dict("Image")], |
||
28 | ["data/nobel", self.dic.get_dict("Novel")], |
||
29 | ] |
||
30 | self.TITLE_BINARY = data.TITLE_BINARY |
||
31 | self.BLANK_IMAGE = data.BLANK_IMAGE |
||
32 | self.VERSION = data.__version__ |
||
33 | # メニューバーの作成 |
||
34 | self.menu_bar = tk.Menu(master) |
||
35 | self.master.config(menu=self.menu_bar) |
||
36 | # フォントをOSごとに変える |
||
37 | pf = platform.system() |
||
38 | if pf == "Windows": |
||
39 | self.font = "メイリオ" |
||
40 | elif pf == "Darwin": # MacOS |
||
41 | self.font = "Osaka-等幅" |
||
42 | elif pf == "Linux": |
||
43 | self.font = "IPAゴシック" |
||
44 | else: |
||
45 | self.font = "" |
||
46 |