Repository navigation
Expand file tree
/
Copy pathconstants.py
More file actions
62 lines (52 loc) · 1.77 KB
/
Copy pathconstants.py
File metadata and controls
62 lines (52 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
"""
该模块用于存储应用程序的所有全局常量。
将常量集中管理可以简化维护和配置。
"""
# #####################################################################
# 1. 应用程序元数据
# #####################################################################
# 应用程序的版本号
APP_VERSION = "v2.0.0"
# #####################################################################
# 2. 编辑器相关常量
# #####################################################################
# 语法高亮延迟时间(毫秒),用于防止在快速输入时频繁重绘
HIGHLIGHT_DELAY_MS = 250
# #####################################################################
# 3. UI相关常量
# #####################################################################
EDITOR_STYLE = {
"font": ("黑体", 10),
"background": "#FFFFFF",
"foreground": "#000000",
"insertbackground": "black",
"selectbackground": "#ADD6FF",
"selectforeground": "black",
"inactiveselectbackground": "#E5E5E5",
"insertwidth": 2,
"padx": 5,
"pady": 5,
}
# #####################################################################
# 4. 格式定义
# #####################################################################
# 统一管理所有支持的字典格式定义
# 每个格式都包含一个用户友好的名称和一个默认文件扩展名
FORMAT_DEFINITIONS = {
"KeywordGacha_JSON": {
"name": "AiNiee/LinguaGacha JSON格式",
"ext": ".json"
},
"GPPV2_TOML_SHORT": {
"name": "GalTranslPP V2 TOML (简写)",
"ext": ".toml"
},
"GPPV2_TOML_FULL": {
"name": "GalTranslPP V2 TOML (完整)",
"ext": ".toml"
},
"GalTransl_TSV": {
"name": "GalTransl TSV格式",
"ext": ".txt"
},
}