You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
249 lines
4.9 KiB
Plaintext
249 lines
4.9 KiB
Plaintext
/* ==================== 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;
|
|
} |