add config and change logo
This commit is contained in:
25
common/config.py
Normal file
25
common/config.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from pathlib import Path
|
||||
from qfluentwidgets import (
|
||||
QConfig, qconfig, Theme, BoolValidator, ConfigItem,
|
||||
SmoothMode, OptionsValidator, EnumSerializer, OptionsConfigItem,
|
||||
)
|
||||
from common.utils import get_app_dir
|
||||
|
||||
|
||||
class Config(QConfig):
|
||||
|
||||
switch_animation = ConfigItem("Personalize", "SwitchAnimation", True,
|
||||
BoolValidator(), restart=True)
|
||||
smooth_mode = OptionsConfigItem("Personalize", "SmoothMode", SmoothMode.CONSTANT,
|
||||
OptionsValidator(SmoothMode), EnumSerializer(SmoothMode), restart=True)
|
||||
|
||||
|
||||
VERSION = "1.0.0"
|
||||
ORG_NAME = "Oranje"
|
||||
APP_NAME = "SafeMarksClient"
|
||||
ZH_APP_NAME = "安全标记客户端"
|
||||
APP_DIR = get_app_dir(ORG_NAME, APP_NAME)
|
||||
|
||||
cfg = Config()
|
||||
cfg.themeMode.value = Theme.LIGHT
|
||||
qconfig.load(str(Path(APP_DIR) / "config.json"), cfg)
|
||||
Reference in New Issue
Block a user