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"""后面的选项仅在'{bottom_options[0]}'未被勾选时起效""" # 样式 # 创建字体 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)