优化规程样式 提供整行hover
parent
da7c6de0b9
commit
c9aa04fa73
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,249 @@
|
||||
/* ==================== DCS2025 规程表格样式 ==================== */
|
||||
|
||||
/* ==================== 表格基础样式 ==================== */
|
||||
QTableView {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #E5E7EB;
|
||||
border-radius: 6px;
|
||||
gridline-color: #F3F4F6;
|
||||
font-size: 13px;
|
||||
color: #374151;
|
||||
selection-background-color: #EBF8FF;
|
||||
selection-color: #1E40AF;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* 表格项基础样式 */
|
||||
QTableView::item {
|
||||
padding: 8px;
|
||||
border: none;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
/* 表格项选中状态 - 整行选中效果 */
|
||||
QTableView::item:selected {
|
||||
background-color: #EBF8FF;
|
||||
color: #1E40AF;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* 表格项hover状态 - 整行hover效果 */
|
||||
QTableView::item:hover {
|
||||
background-color: #F0F9FF;
|
||||
color: #1F2937;
|
||||
}
|
||||
|
||||
/* 表格项选中且hover状态 */
|
||||
QTableView::item:selected:hover {
|
||||
background-color: #DBEAFE;
|
||||
color: #1565C0;
|
||||
}
|
||||
|
||||
/* 表格项焦点状态 */
|
||||
QTableView::item:focus {
|
||||
background-color: #EBF8FF;
|
||||
color: #1E40AF;
|
||||
outline: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* ==================== 表格头部样式 ==================== */
|
||||
QHeaderView {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QHeaderView::section {
|
||||
background-color: #F8F9FA;
|
||||
color: #374151;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
padding: 12px 8px;
|
||||
border: 1px solid #E5E7EB;
|
||||
border-left: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QHeaderView::section:first {
|
||||
border-left: 1px solid #E5E7EB;
|
||||
border-top-left-radius: 6px;
|
||||
}
|
||||
|
||||
QHeaderView::section:last {
|
||||
border-top-right-radius: 6px;
|
||||
}
|
||||
|
||||
QHeaderView::section:hover {
|
||||
background-color: #F3F4F6;
|
||||
color: #1F2937;
|
||||
}
|
||||
|
||||
QHeaderView::section:pressed {
|
||||
background-color: #E5E7EB;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
/* ==================== 垂直表头隐藏 ==================== */
|
||||
QHeaderView::section:vertical {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* ==================== 滚动条样式 ==================== */
|
||||
QScrollBar:vertical {
|
||||
background-color: #F9FAFB;
|
||||
width: 12px;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical {
|
||||
background-color: #D1D5DB;
|
||||
border-radius: 6px;
|
||||
min-height: 20px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical:hover {
|
||||
background-color: #9CA3AF;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical:pressed {
|
||||
background-color: #6B7280;
|
||||
}
|
||||
|
||||
QScrollBar::add-line:vertical,
|
||||
QScrollBar::sub-line:vertical {
|
||||
border: none;
|
||||
background: none;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
QScrollBar::add-page:vertical,
|
||||
QScrollBar::sub-page:vertical {
|
||||
background: none;
|
||||
}
|
||||
|
||||
QScrollBar:horizontal {
|
||||
background-color: #F9FAFB;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
QScrollBar::handle:horizontal {
|
||||
background-color: #D1D5DB;
|
||||
border-radius: 6px;
|
||||
min-width: 20px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:horizontal:hover {
|
||||
background-color: #9CA3AF;
|
||||
}
|
||||
|
||||
QScrollBar::handle:horizontal:pressed {
|
||||
background-color: #6B7280;
|
||||
}
|
||||
|
||||
QScrollBar::add-line:horizontal,
|
||||
QScrollBar::sub-line:horizontal {
|
||||
border: none;
|
||||
background: none;
|
||||
width: 0px;
|
||||
}
|
||||
|
||||
QScrollBar::add-page:horizontal,
|
||||
QScrollBar::sub-page:horizontal {
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* ==================== 特殊状态样式 ==================== */
|
||||
|
||||
/* 执行成功的行 - 绿色主题 */
|
||||
QTableView::item[executionStatus="success"] {
|
||||
background-color: #ECFDF5;
|
||||
color: #065F46;
|
||||
}
|
||||
|
||||
QTableView::item[executionStatus="success"]:hover {
|
||||
background-color: #D1FAE5;
|
||||
color: #047857;
|
||||
}
|
||||
|
||||
QTableView::item[executionStatus="success"]:selected {
|
||||
background-color: #A7F3D0;
|
||||
color: #064E3B;
|
||||
}
|
||||
|
||||
/* 执行失败的行 - 红色主题 */
|
||||
QTableView::item[executionStatus="failed"] {
|
||||
background-color: #FEF2F2;
|
||||
color: #991B1B;
|
||||
}
|
||||
|
||||
QTableView::item[executionStatus="failed"]:hover {
|
||||
background-color: #FEE2E2;
|
||||
color: #7F1D1D;
|
||||
}
|
||||
|
||||
QTableView::item[executionStatus="failed"]:selected {
|
||||
background-color: #FECACA;
|
||||
color: #7F1D1D;
|
||||
}
|
||||
|
||||
/* 主步骤行 - 灰色主题 */
|
||||
QTableView::item[stepType="main"] {
|
||||
background-color: #F9FAFB;
|
||||
color: #374151;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
QTableView::item[stepType="main"]:hover {
|
||||
background-color: #F3F4F6;
|
||||
color: #1F2937;
|
||||
}
|
||||
|
||||
QTableView::item[stepType="main"]:selected {
|
||||
background-color: #E5E7EB;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
/* ==================== 网格线样式 ==================== */
|
||||
QTableView {
|
||||
gridline-color: #F3F4F6;
|
||||
show-decoration-selected: 1;
|
||||
}
|
||||
|
||||
/* ==================== 文本对齐 ==================== */
|
||||
QTableView::item[textAlign="center"] {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QTableView::item[textAlign="left"] {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
QTableView::item[textAlign="right"] {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* ==================== 响应式设计 ==================== */
|
||||
QTableView[size="compact"] {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
QTableView[size="compact"]::item {
|
||||
padding: 6px;
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
QTableView[size="large"] {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
QTableView[size="large"]::item {
|
||||
padding: 10px;
|
||||
min-height: 48px;
|
||||
}
|
@ -0,0 +1,390 @@
|
||||
/* ==================== DCS2025 步骤执行器样式 ==================== */
|
||||
|
||||
/* ==================== 执行按钮样式 ==================== */
|
||||
|
||||
/* 开始自动执行按钮 - 绿色主题 */
|
||||
QPushButton#autoExecuteBtn {
|
||||
color: #047857;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
padding: 8px 16px;
|
||||
background-color: #ECFDF5;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #BBF7D0;
|
||||
font-family: "PingFangSC-Medium", "Microsoft YaHei", sans-serif;
|
||||
min-width: 100px;
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
QPushButton#autoExecuteBtn:hover {
|
||||
background-color: #D1FAE5;
|
||||
border-color: #86EFAC;
|
||||
color: #065F46;
|
||||
}
|
||||
|
||||
QPushButton#autoExecuteBtn:pressed {
|
||||
background-color: #A7F3D0;
|
||||
border-color: #6EE7B7;
|
||||
color: #064E3B;
|
||||
}
|
||||
|
||||
QPushButton#autoExecuteBtn:disabled {
|
||||
background-color: #F3F4F6;
|
||||
color: #9CA3AF;
|
||||
border-color: #E5E7EB;
|
||||
}
|
||||
|
||||
/* 停止自动执行按钮 - 红色主题 */
|
||||
QPushButton#stopExecuteBtn {
|
||||
color: #B91C1C;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
padding: 8px 16px;
|
||||
background-color: #FEF2F2;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #FECACA;
|
||||
font-family: "PingFangSC-Medium", "Microsoft YaHei", sans-serif;
|
||||
min-width: 100px;
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
QPushButton#stopExecuteBtn:hover {
|
||||
background-color: #FEE2E2;
|
||||
border-color: #FCA5A5;
|
||||
color: #991B1B;
|
||||
}
|
||||
|
||||
QPushButton#stopExecuteBtn:pressed {
|
||||
background-color: #FECACA;
|
||||
border-color: #F87171;
|
||||
color: #7F1D1D;
|
||||
}
|
||||
|
||||
QPushButton#stopExecuteBtn:disabled {
|
||||
background-color: #F3F4F6;
|
||||
color: #9CA3AF;
|
||||
border-color: #E5E7EB;
|
||||
}
|
||||
|
||||
/* 执行下一步按钮 - 蓝色主题 */
|
||||
QPushButton#nextStepBtn {
|
||||
color: #1D4ED8;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
padding: 8px 16px;
|
||||
background-color: #EBF8FF;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #BFDBFE;
|
||||
font-family: "PingFangSC-Medium", "Microsoft YaHei", sans-serif;
|
||||
min-width: 100px;
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
QPushButton#nextStepBtn:hover {
|
||||
background-color: #DBEAFE;
|
||||
border-color: #93C5FD;
|
||||
color: #1E40AF;
|
||||
}
|
||||
|
||||
QPushButton#nextStepBtn:pressed {
|
||||
background-color: #BFDBFE;
|
||||
border-color: #60A5FA;
|
||||
color: #1E3A8A;
|
||||
}
|
||||
|
||||
QPushButton#nextStepBtn:disabled {
|
||||
background-color: #F3F4F6;
|
||||
color: #9CA3AF;
|
||||
border-color: #E5E7EB;
|
||||
}
|
||||
|
||||
/* 完全重置按钮 - 橙色主题 */
|
||||
QPushButton#resetExecuteBtn {
|
||||
color: #D97706;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
padding: 8px 16px;
|
||||
background-color: #FEF3C7;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #FCD34D;
|
||||
font-family: "PingFangSC-Medium", "Microsoft YaHei", sans-serif;
|
||||
min-width: 100px;
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
QPushButton#resetExecuteBtn:hover {
|
||||
background-color: #FDE68A;
|
||||
border-color: #FBBF24;
|
||||
color: #B45309;
|
||||
}
|
||||
|
||||
QPushButton#resetExecuteBtn:pressed {
|
||||
background-color: #FCD34D;
|
||||
border-color: #F59E0B;
|
||||
color: #92400E;
|
||||
}
|
||||
|
||||
QPushButton#resetExecuteBtn:disabled {
|
||||
background-color: #F3F4F6;
|
||||
color: #9CA3AF;
|
||||
border-color: #E5E7EB;
|
||||
}
|
||||
|
||||
/* 生成报告按钮 - 紫色主题 */
|
||||
QPushButton#exportReportBtn {
|
||||
color: #7C3AED;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
padding: 8px 16px;
|
||||
background-color: #F3E8FF;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #C4B5FD;
|
||||
font-family: "PingFangSC-Medium", "Microsoft YaHei", sans-serif;
|
||||
min-width: 100px;
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
QPushButton#exportReportBtn:hover {
|
||||
background-color: #EDE9FE;
|
||||
border-color: #A78BFA;
|
||||
color: #6D28D9;
|
||||
}
|
||||
|
||||
QPushButton#exportReportBtn:pressed {
|
||||
background-color: #DDD6FE;
|
||||
border-color: #8B5CF6;
|
||||
color: #5B21B6;
|
||||
}
|
||||
|
||||
QPushButton#exportReportBtn:disabled {
|
||||
background-color: #F3F4F6;
|
||||
color: #9CA3AF;
|
||||
border-color: #E5E7EB;
|
||||
}
|
||||
|
||||
/* ==================== 状态标签样式 ==================== */
|
||||
|
||||
/* 状态标签基础样式 */
|
||||
QLabel#statusLabel {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
padding: 6px 12px;
|
||||
border-radius: 4px;
|
||||
background-color: #EBF8FF;
|
||||
color: #1E40AF;
|
||||
border: 1px solid #BFDBFE;
|
||||
}
|
||||
|
||||
/* 执行状态标签 */
|
||||
QLabel#executionStatusLabel {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
padding: 6px 12px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
/* 成功状态 */
|
||||
QLabel#executionStatusLabel[status="success"] {
|
||||
background-color: #ECFDF5;
|
||||
color: #065F46;
|
||||
border-color: #BBF7D0;
|
||||
}
|
||||
|
||||
/* 错误状态 */
|
||||
QLabel#executionStatusLabel[status="error"] {
|
||||
background-color: #FEF2F2;
|
||||
color: #991B1B;
|
||||
border-color: #FECACA;
|
||||
}
|
||||
|
||||
/* 警告状态 */
|
||||
QLabel#executionStatusLabel[status="warning"] {
|
||||
background-color: #FEF3C7;
|
||||
color: #92400E;
|
||||
border-color: #FCD34D;
|
||||
}
|
||||
|
||||
/* 信息状态 */
|
||||
QLabel#executionStatusLabel[status="info"] {
|
||||
background-color: #EBF8FF;
|
||||
color: #1E40AF;
|
||||
border-color: #BFDBFE;
|
||||
}
|
||||
|
||||
/* ==================== 倒计时标签样式 ==================== */
|
||||
|
||||
QLabel#countdownLabel {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
font-family: "Consolas", "Monaco", monospace;
|
||||
}
|
||||
|
||||
/* 剩余时间充足 */
|
||||
QLabel#countdownLabel[timeRemaining="high"] {
|
||||
background-color: #ECFDF5;
|
||||
color: #065F46;
|
||||
border: 1px solid #BBF7D0;
|
||||
}
|
||||
|
||||
/* 剩余时间中等 */
|
||||
QLabel#countdownLabel[timeRemaining="medium"] {
|
||||
background-color: #FEF3C7;
|
||||
color: #92400E;
|
||||
border: 1px solid #FCD34D;
|
||||
}
|
||||
|
||||
/* 剩余时间不足 */
|
||||
QLabel#countdownLabel[timeRemaining="low"] {
|
||||
background-color: #FEF2F2;
|
||||
color: #991B1B;
|
||||
border: 1px solid #FECACA;
|
||||
}
|
||||
|
||||
/* 已完成 */
|
||||
QLabel#countdownLabel[timeRemaining="completed"] {
|
||||
background-color: #EBF8FF;
|
||||
color: #1E40AF;
|
||||
border: 1px solid #BFDBFE;
|
||||
}
|
||||
|
||||
/* ==================== 规程信息区域样式 ==================== */
|
||||
|
||||
/* 规程信息容器 */
|
||||
QWidget#procedureInfoContainer {
|
||||
background-color: #F8F9FA;
|
||||
border: 1px solid #E5E7EB;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* 超紧凑信息组 */
|
||||
QWidget#ultraCompactInfoGroup {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* 超紧凑信息标签 */
|
||||
QLabel#ultraCompactInfoLabel {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #6B7280;
|
||||
}
|
||||
|
||||
/* 超紧凑信息值 */
|
||||
QLabel#ultraCompactInfoValue {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #374151;
|
||||
}
|
||||
|
||||
/* ==================== 表格样式 ==================== */
|
||||
|
||||
/* 表格视图基础样式 */
|
||||
QTableView {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #E5E7EB;
|
||||
border-radius: 6px;
|
||||
gridline-color: #F3F4F6;
|
||||
selection-background-color: #EBF8FF;
|
||||
selection-color: #1E40AF;
|
||||
font-size: 13px;
|
||||
color: #374151;
|
||||
}
|
||||
|
||||
QTableView::item {
|
||||
padding: 8px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
QTableView::item:hover {
|
||||
background-color: #F9FAFB;
|
||||
}
|
||||
|
||||
QTableView::item:selected {
|
||||
background-color: #EBF8FF;
|
||||
color: #1E40AF;
|
||||
}
|
||||
|
||||
/* 表格头部样式 */
|
||||
QHeaderView::section {
|
||||
background-color: #F3F4F6;
|
||||
color: #374151;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
padding: 8px;
|
||||
border: 1px solid #E5E7EB;
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
QHeaderView::section:first {
|
||||
border-left: 1px solid #E5E7EB;
|
||||
}
|
||||
|
||||
QHeaderView::section:hover {
|
||||
background-color: #E5E7EB;
|
||||
}
|
||||
|
||||
/* ==================== 输入控件样式 ==================== */
|
||||
|
||||
/* 数值输入框 */
|
||||
QSpinBox, QDoubleSpinBox {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #E5E7EB;
|
||||
border-radius: 4px;
|
||||
padding: 4px 8px;
|
||||
font-size: 13px;
|
||||
color: #374151;
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
QSpinBox:focus, QDoubleSpinBox:focus {
|
||||
border-color: #3B82F6;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* 复选框 */
|
||||
QCheckBox {
|
||||
font-size: 13px;
|
||||
color: #374151;
|
||||
spacing: 6px;
|
||||
}
|
||||
|
||||
QCheckBox::indicator {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 1px solid #D1D5DB;
|
||||
border-radius: 3px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
QCheckBox::indicator:checked {
|
||||
background-color: #3B82F6;
|
||||
border-color: #3B82F6;
|
||||
image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDNMNC41IDguNUwyIDYiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
||||
}
|
||||
|
||||
QCheckBox::indicator:hover {
|
||||
border-color: #9CA3AF;
|
||||
}
|
||||
|
||||
/* ==================== 标签样式 ==================== */
|
||||
|
||||
QLabel {
|
||||
font-size: 13px;
|
||||
color: #374151;
|
||||
}
|
||||
|
||||
/* 标题标签 */
|
||||
QLabel[class="title"] {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #1F2937;
|
||||
}
|
||||
|
||||
/* 副标题标签 */
|
||||
QLabel[class="subtitle"] {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #4B5563;
|
||||
}
|
Loading…
Reference in New Issue