add UI and Feature: Config Window Compact Mode.

This commit is contained in:
Sakamoto Shiina
2023-08-31 19:13:14 +09:00
parent cb434717e0
commit 08d3f04738
6 changed files with 68 additions and 6 deletions

View File

@@ -442,6 +442,17 @@ class Config:
self._SELECTED_TAB_TARGET_LANGUAGES = value
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
# Config Window
@property
def IS_CONFIG_WINDOW_COMPACT_MODE(self):
return self._IS_CONFIG_WINDOW_COMPACT_MODE
@IS_CONFIG_WINDOW_COMPACT_MODE.setter
def IS_CONFIG_WINDOW_COMPACT_MODE(self, value):
if type(value) is bool:
self._IS_CONFIG_WINDOW_COMPACT_MODE = value
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
def init_config(self):
self._VERSION = "1.3.2"
self._PATH_CONFIG = "./config.json"
@@ -505,6 +516,9 @@ class Config:
"3":"English\n(United States)",
}
# Config Window
self._IS_CONFIG_WINDOW_COMPACT_MODE = False
def load_config(self):
if os_path.isfile(self.PATH_CONFIG) is not False:
with open(self.PATH_CONFIG, 'r') as fp: