软件界面适配深色模式

修改了<体动标注>中按钮的颜色显示规则
This commit is contained in:
Yorusora
2025-06-10 17:43:36 +08:00
parent bbd043cf58
commit af1a0ec531
13 changed files with 118 additions and 91 deletions

View File

@ -70,11 +70,6 @@ class Constants:
PLOT_COLOR_PINK: str = "#ff00ff"
PLOT_COLOR_PURPLE: str = "m"
PLOT_COLOR_GRAY: str = "gray"
PLOT_COLOR_DEEP_YELLOW: str = "#ffa500"
PLOT_COLOR_YELLOW: str = "#ffff00"
PLOT_COLOR_AQUA: str = "#00ffff"
PLOT_COLOR_PURPLE_PINK: str = "#ee82ee"
PLOT_COLOR_DEEP_GREY: str = "#808080"
PROGRESSBAR_STYLE: str = """
QProgressBar {
@ -92,6 +87,11 @@ class Constants:
}
"""
LABELBTN_STYLE_NORMAL: str = """
QPushButton:hover {
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
FAILURE_REASON: dict = {
"Path_Not_Exist": "(路径不存在)",
"File_Not_Exist": "(数据文件不存在)",
@ -358,55 +358,60 @@ class Constants:
ARTIFACT_LABEL_DELETE_ARTIFACT_FAILURE: str = "需要被删除的体动不存在"
ARTIFACT_LABEL_ACTION_LABEL: str = f"标注体动({Params.ARTIFACT_LABEL_ACTION_LABEL_ARTIFACT_SHORTCUT_KEY})"
# 橙色orange
ARTIFACT_LABEL_LABELBTN_STYLE_1: str = """
QPushButton {
background-color: #ffa500; /* 设置背景颜色 */
background-color: rgba(255, 165, 0, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
# 黄色yellow
ARTIFACT_LABEL_LABELBTN_STYLE_2: str = """
QPushButton {
background-color: #ffff00; /* 设置背景颜色 */
background-color: rgba(255, 255, 0, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
# 草绿色limegreen
ARTIFACT_LABEL_LABELBTN_STYLE_3: str = """
QPushButton {
background-color: #00ffff; /* 设置背景颜色 */
background-color: rgba(50, 205, 50, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
# 青色cyan
ARTIFACT_LABEL_LABELBTN_STYLE_4: str = """
QPushButton {
background-color: #ee82ee; /* 设置背景颜色 */
background-color: rgba(0, 255, 255, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
# 品红色magenta
ARTIFACT_LABEL_LABELBTN_STYLE_5: str = """
QPushButton {
background-color: #808080; /* 设置背景颜色 */
background-color: rgba(255, 0, 255, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: #00ff00; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""
# BCG的质量标注
@ -435,13 +440,13 @@ class Constants:
BCG_QUALITY_LABEL_LABEL_ARTIFACT_TO_TYPE_C_QUESTION_CONTENT: str = "你确定要将所有带有体动的片段标记为类型C"
BCG_QUALITY_LABEL_LABELBTN_STYLE: str = """
QPushButton {
background-color: orange; /* 设置背景颜色 */
background-color: rgba(255, 165, 0, 128); /* 设置背景颜色 */
padding: 10px; /* 设置内边距 */
border: 2px solid darkblue; /* 设置边框 */
border-radius: 10px; /* 设置圆角 */
}
QPushButton:hover {
background-color: yellow; /* 鼠标悬停时的背景颜色 */
background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
}"""