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