You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
556 lines
11 KiB
556 lines
11 KiB
/* ========================================
|
|
战场环境探索系统 - 统一样式规范
|
|
UBEES Battle Environment Exploration System
|
|
======================================== */
|
|
|
|
/* ========================================
|
|
1. 全局变量定义 (Color Palette)
|
|
======================================== */
|
|
|
|
/* 主色调 - 军事蓝色系 */
|
|
/* Primary Colors */
|
|
/* #1e3a5f - 深蓝色背景 */
|
|
/* #2c5282 - 中蓝色 */
|
|
/* #4a90e2 - 亮蓝色 */
|
|
/* #5ba0f2 - 高亮蓝色 */
|
|
|
|
/* 辅助色 */
|
|
/* #f39c12 - 警告橙色 */
|
|
/* #e74c3c - 危险红色 */
|
|
/* #27ae60 - 成功绿色 */
|
|
/* #95a5a6 - 中性灰色 */
|
|
|
|
/* 背景色 */
|
|
/* #0f1419 - 最深背景 */
|
|
/* #1a252f - 深背景 */
|
|
/* #2d3748 - 中背景 */
|
|
/* #4a5568 - 浅背景 */
|
|
|
|
/* ========================================
|
|
2. 全局基础样式
|
|
======================================== */
|
|
|
|
QWidget {
|
|
background-color: #1e3a5f;
|
|
color: #ffffff;
|
|
font-family: "Microsoft YaHei", "SimHei", Arial, sans-serif;
|
|
font-size: 12px;
|
|
selection-background-color: #4a90e2;
|
|
selection-color: #ffffff;
|
|
}
|
|
|
|
QMainWindow {
|
|
background-color: #0f1419;
|
|
border: none;
|
|
}
|
|
|
|
/* ========================================
|
|
3. 按钮样式系统
|
|
======================================== */
|
|
|
|
/* 主要按钮 - 蓝色系 */
|
|
QPushButton {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #4a90e2, stop:1 #2c5282);
|
|
border: 1px solid #1e3a5f;
|
|
border-radius: 6px;
|
|
color: #ffffff;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
padding: 8px 16px;
|
|
min-height: 24px;
|
|
min-width: 80px;
|
|
}
|
|
|
|
QPushButton:hover {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #5ba0f2, stop:1 #4a90e2);
|
|
border: 1px solid #4a90e2;
|
|
}
|
|
|
|
QPushButton:pressed {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #2c5282, stop:1 #1e3a5f);
|
|
border: 1px solid #1e3a5f;
|
|
}
|
|
|
|
QPushButton:disabled {
|
|
background: #4a5568;
|
|
border: 1px solid #2d3748;
|
|
color: #95a5a6;
|
|
}
|
|
|
|
/* 危险按钮 - 红色系 */
|
|
QPushButton[class="danger"] {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #e74c3c, stop:1 #c0392b);
|
|
border: 1px solid #a93226;
|
|
}
|
|
|
|
QPushButton[class="danger"]:hover {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #ec7063, stop:1 #e74c3c);
|
|
}
|
|
|
|
/* 成功按钮 - 绿色系 */
|
|
QPushButton[class="success"] {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #27ae60, stop:1 #229954);
|
|
border: 1px solid #1e8449;
|
|
}
|
|
|
|
QPushButton[class="success"]:hover {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #58d68d, stop:1 #27ae60);
|
|
}
|
|
|
|
/* 警告按钮 - 橙色系 */
|
|
QPushButton[class="warning"] {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #f39c12, stop:1 #e67e22);
|
|
border: 1px solid #d68910;
|
|
}
|
|
|
|
QPushButton[class="warning"]:hover {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #f7dc6f, stop:1 #f39c12);
|
|
}
|
|
|
|
/* ========================================
|
|
4. 输入控件样式
|
|
======================================== */
|
|
|
|
QLineEdit {
|
|
background-color: #2d3748;
|
|
border: 2px solid #4a5568;
|
|
border-radius: 6px;
|
|
color: #ffffff;
|
|
font-size: 13px;
|
|
padding: 8px 12px;
|
|
min-height: 20px;
|
|
}
|
|
|
|
QLineEdit:focus {
|
|
border: 2px solid #4a90e2;
|
|
background-color: #1a252f;
|
|
}
|
|
|
|
QLineEdit:disabled {
|
|
background-color: #4a5568;
|
|
border: 2px solid #2d3748;
|
|
color: #95a5a6;
|
|
}
|
|
|
|
QTextEdit {
|
|
background-color: #2d3748;
|
|
border: 2px solid #4a5568;
|
|
border-radius: 6px;
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
padding: 8px;
|
|
}
|
|
|
|
QTextEdit:focus {
|
|
border: 2px solid #4a90e2;
|
|
}
|
|
|
|
/* ========================================
|
|
5. 下拉框和组合框样式
|
|
======================================== */
|
|
|
|
QComboBox {
|
|
background-color: #2d3748;
|
|
border: 2px solid #4a5568;
|
|
border-radius: 6px;
|
|
color: #ffffff;
|
|
font-size: 13px;
|
|
padding: 6px 12px;
|
|
min-height: 24px;
|
|
min-width: 120px;
|
|
}
|
|
|
|
QComboBox:hover {
|
|
border: 2px solid #4a90e2;
|
|
}
|
|
|
|
QComboBox::drop-down {
|
|
border: none;
|
|
width: 30px;
|
|
background: transparent;
|
|
}
|
|
|
|
QComboBox::down-arrow {
|
|
image: none;
|
|
border-left: 5px solid transparent;
|
|
border-right: 5px solid transparent;
|
|
border-top: 5px solid #ffffff;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
QComboBox QAbstractItemView {
|
|
background-color: #2d3748;
|
|
border: 1px solid #4a90e2;
|
|
border-radius: 4px;
|
|
color: #ffffff;
|
|
selection-background-color: #4a90e2;
|
|
outline: none;
|
|
}
|
|
|
|
/* ========================================
|
|
6. 表格样式
|
|
======================================== */
|
|
|
|
QTableWidget {
|
|
background-color: #1a252f;
|
|
alternate-background-color: #2d3748;
|
|
gridline-color: #4a5568;
|
|
border: 1px solid #4a5568;
|
|
border-radius: 6px;
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
}
|
|
|
|
QTableWidget::item {
|
|
padding: 8px;
|
|
border: none;
|
|
}
|
|
|
|
QTableWidget::item:selected {
|
|
background-color: #4a90e2;
|
|
color: #ffffff;
|
|
}
|
|
|
|
QTableWidget::item:hover {
|
|
background-color: #2c5282;
|
|
}
|
|
|
|
QHeaderView::section {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #4a5568, stop:1 #2d3748);
|
|
border: 1px solid #4a5568;
|
|
color: #ffffff;
|
|
font-weight: bold;
|
|
padding: 8px;
|
|
text-align: center;
|
|
}
|
|
|
|
QHeaderView::section:hover {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #5a6578, stop:1 #4a5568);
|
|
}
|
|
|
|
/* ========================================
|
|
7. 滚动条样式
|
|
======================================== */
|
|
|
|
QScrollBar:vertical {
|
|
background-color: #2d3748;
|
|
width: 12px;
|
|
border-radius: 6px;
|
|
margin: 0;
|
|
}
|
|
|
|
QScrollBar::handle:vertical {
|
|
background-color: #4a90e2;
|
|
border-radius: 6px;
|
|
min-height: 20px;
|
|
margin: 2px;
|
|
}
|
|
|
|
QScrollBar::handle:vertical:hover {
|
|
background-color: #5ba0f2;
|
|
}
|
|
|
|
QScrollBar::add-line:vertical,
|
|
QScrollBar::sub-line:vertical {
|
|
height: 0;
|
|
background: none;
|
|
}
|
|
|
|
QScrollBar:horizontal {
|
|
background-color: #2d3748;
|
|
height: 12px;
|
|
border-radius: 6px;
|
|
margin: 0;
|
|
}
|
|
|
|
QScrollBar::handle:horizontal {
|
|
background-color: #4a90e2;
|
|
border-radius: 6px;
|
|
min-width: 20px;
|
|
margin: 2px;
|
|
}
|
|
|
|
QScrollBar::handle:horizontal:hover {
|
|
background-color: #5ba0f2;
|
|
}
|
|
|
|
QScrollBar::add-line:horizontal,
|
|
QScrollBar::sub-line:horizontal {
|
|
width: 0;
|
|
background: none;
|
|
}
|
|
|
|
/* ========================================
|
|
8. 分组框和标签样式
|
|
======================================== */
|
|
|
|
QGroupBox {
|
|
background-color: #1a252f;
|
|
border: 2px solid #4a5568;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
font-weight: bold;
|
|
color: #4a90e2;
|
|
margin-top: 10px;
|
|
padding-top: 15px;
|
|
}
|
|
|
|
QGroupBox::title {
|
|
subcontrol-origin: margin;
|
|
subcontrol-position: top left;
|
|
left: 15px;
|
|
top: -5px;
|
|
background-color: #1a252f;
|
|
padding: 0 8px;
|
|
}
|
|
|
|
QLabel {
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
background: transparent;
|
|
}
|
|
|
|
QLabel[class="title"] {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
color: #4a90e2;
|
|
}
|
|
|
|
QLabel[class="subtitle"] {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: #5ba0f2;
|
|
}
|
|
|
|
QLabel[class="status-online"] {
|
|
color: #27ae60;
|
|
font-weight: bold;
|
|
}
|
|
|
|
QLabel[class="status-offline"] {
|
|
color: #e74c3c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
QLabel[class="status-warning"] {
|
|
color: #f39c12;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* ========================================
|
|
9. 复选框和单选框样式
|
|
======================================== */
|
|
|
|
QCheckBox {
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
spacing: 8px;
|
|
}
|
|
|
|
QCheckBox::indicator {
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 2px solid #4a5568;
|
|
border-radius: 3px;
|
|
background-color: #2d3748;
|
|
}
|
|
|
|
QCheckBox::indicator:checked {
|
|
background-color: #4a90e2;
|
|
border: 2px solid #4a90e2;
|
|
image: none;
|
|
}
|
|
|
|
QCheckBox::indicator:checked:hover {
|
|
background-color: #5ba0f2;
|
|
border: 2px solid #5ba0f2;
|
|
}
|
|
|
|
QRadioButton {
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
spacing: 8px;
|
|
}
|
|
|
|
QRadioButton::indicator {
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 2px solid #4a5568;
|
|
border-radius: 8px;
|
|
background-color: #2d3748;
|
|
}
|
|
|
|
QRadioButton::indicator:checked {
|
|
background-color: #4a90e2;
|
|
border: 2px solid #4a90e2;
|
|
}
|
|
|
|
/* ========================================
|
|
10. 进度条样式
|
|
======================================== */
|
|
|
|
QProgressBar {
|
|
background-color: #2d3748;
|
|
border: 1px solid #4a5568;
|
|
border-radius: 6px;
|
|
text-align: center;
|
|
color: #ffffff;
|
|
font-weight: bold;
|
|
min-height: 20px;
|
|
}
|
|
|
|
QProgressBar::chunk {
|
|
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
|
|
stop:0 #4a90e2, stop:1 #5ba0f2);
|
|
border-radius: 5px;
|
|
margin: 1px;
|
|
}
|
|
|
|
/* ========================================
|
|
11. 工具提示样式
|
|
======================================== */
|
|
|
|
QToolTip {
|
|
background-color: #1a252f;
|
|
border: 1px solid #4a90e2;
|
|
border-radius: 4px;
|
|
color: #ffffff;
|
|
font-size: 11px;
|
|
padding: 6px 8px;
|
|
}
|
|
|
|
/* ========================================
|
|
12. 菜单样式
|
|
======================================== */
|
|
|
|
QMenuBar {
|
|
background-color: #1e3a5f;
|
|
border-bottom: 1px solid #4a5568;
|
|
color: #ffffff;
|
|
font-size: 13px;
|
|
}
|
|
|
|
QMenuBar::item {
|
|
background: transparent;
|
|
padding: 8px 12px;
|
|
}
|
|
|
|
QMenuBar::item:selected {
|
|
background-color: #4a90e2;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
QMenu {
|
|
background-color: #2d3748;
|
|
border: 1px solid #4a5568;
|
|
border-radius: 6px;
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
}
|
|
|
|
QMenu::item {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
}
|
|
|
|
QMenu::item:selected {
|
|
background-color: #4a90e2;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
QMenu::separator {
|
|
height: 1px;
|
|
background-color: #4a5568;
|
|
margin: 4px 8px;
|
|
}
|
|
|
|
/* ========================================
|
|
13. 状态栏样式
|
|
======================================== */
|
|
|
|
QStatusBar {
|
|
background-color: #1e3a5f;
|
|
border-top: 1px solid #4a5568;
|
|
color: #ffffff;
|
|
font-size: 11px;
|
|
}
|
|
|
|
QStatusBar::item {
|
|
border: none;
|
|
}
|
|
|
|
/* ========================================
|
|
14. 分割器样式
|
|
======================================== */
|
|
|
|
QSplitter::handle {
|
|
background-color: #4a5568;
|
|
}
|
|
|
|
QSplitter::handle:horizontal {
|
|
width: 3px;
|
|
margin: 2px 0;
|
|
}
|
|
|
|
QSplitter::handle:vertical {
|
|
height: 3px;
|
|
margin: 0 2px;
|
|
}
|
|
|
|
QSplitter::handle:hover {
|
|
background-color: #4a90e2;
|
|
}
|
|
|
|
/* ========================================
|
|
15. 标签页样式
|
|
======================================== */
|
|
|
|
QTabWidget::pane {
|
|
background-color: #1a252f;
|
|
border: 1px solid #4a5568;
|
|
border-radius: 6px;
|
|
margin-top: -1px;
|
|
}
|
|
|
|
QTabBar::tab {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #4a5568, stop:1 #2d3748);
|
|
border: 1px solid #4a5568;
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
padding: 8px 16px;
|
|
margin-right: 2px;
|
|
}
|
|
|
|
QTabBar::tab:first {
|
|
border-top-left-radius: 6px;
|
|
}
|
|
|
|
QTabBar::tab:last {
|
|
border-top-right-radius: 6px;
|
|
margin-right: 0;
|
|
}
|
|
|
|
QTabBar::tab:selected {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #4a90e2, stop:1 #2c5282);
|
|
border-bottom: 1px solid #1a252f;
|
|
}
|
|
|
|
QTabBar::tab:hover:!selected {
|
|
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
|
stop:0 #5a6578, stop:1 #4a5568);
|
|
}
|