Files
cyzg/components/constants.py
2025-08-20 17:10:28 +08:00

28 lines
945 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import tkinter.font as font
# 定义
BG_COLOR = "#f4f6f9" # 背景色
FG_COLOR = "#2c3e50" # 主文字色
ACCENT_COLOR = "#3498db" # 主按钮色
CORRECT_COLOR = "#d4edda" # 正确答案 淡绿色
MISS_COLOR = "#5bc04b" # 漏选 绿色
WRONG_COLOR = "#f8d7da" # 错误 红色
SELECTED_COLOR = "#d6eaf8" # 选中/悬浮 浅蓝色
FONT_FAMILY = "微软雅黑"
# 映射
indexMap = {6: "A. ", 7: "B. ", 8: "C. ", 9: "D. "}
# 全局
bottom_options = ["未做过的题", "错过的题", ]
instructions = f"""第二行啥也不选就是不过滤,全部的题
题目是加权平均抽取默认权重为3对一次减1错一次加2."""
# 样式
# 创建字体
class Fonts:
def __init__(self):
self.title = font.Font(family=FONT_FAMILY, size=18, weight="bold")
self.button = font.Font(family=FONT_FAMILY, size=14)
self.text = font.Font(family=FONT_FAMILY, size=13)