364 lines
8.5 KiB
Python
364 lines
8.5 KiB
Python
|
|
# """
|
||
|
|
# 样式定义模块
|
||
|
|
# 包含深色主题样式
|
||
|
|
# """
|
||
|
|
#
|
||
|
|
DARK_THEME = """"""
|
||
|
|
# DARK_THEME = """
|
||
|
|
# /* ==================== 全局样式 ==================== */
|
||
|
|
# QMainWindow, QDialog {
|
||
|
|
# background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
|
||
|
|
# stop:0 #0a0e27, stop:1 #1a1f3a);
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QWidget {
|
||
|
|
# background-color: transparent;
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# font-family: "Microsoft YaHei", "SimHei", Arial;
|
||
|
|
# font-size: 13px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 面板样式 ==================== */
|
||
|
|
# QFrame[frameShape="4"],
|
||
|
|
# QFrame[frameShape="5"] {
|
||
|
|
# background: rgba(30, 41, 59, 0.6);
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.2);
|
||
|
|
# border-radius: 12px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 按钮样式 ==================== */
|
||
|
|
# QPushButton {
|
||
|
|
# background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
||
|
|
# stop:0 #3b82f6, stop:1 #2563eb);
|
||
|
|
# color: white;
|
||
|
|
# border: none;
|
||
|
|
# border-radius: 6px;
|
||
|
|
# padding: 8px 16px;
|
||
|
|
# font-weight: bold;
|
||
|
|
# min-height: 30px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QPushButton:hover {
|
||
|
|
# background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
||
|
|
# stop:0 #60a5fa, stop:1 #3b82f6);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QPushButton:pressed {
|
||
|
|
# background: #2563eb;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QPushButton:disabled {
|
||
|
|
# background: rgba(51, 65, 85, 0.5);
|
||
|
|
# color: #64748b;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 输入框样式 ==================== */
|
||
|
|
# QLineEdit, QTextEdit, QPlainTextEdit {
|
||
|
|
# background: rgba(51, 65, 85, 0.5);
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.2);
|
||
|
|
# border-radius: 6px;
|
||
|
|
# padding: 8px;
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# selection-background-color: #3b82f6;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QLineEdit:focus, QTextEdit:focus, QPlainTextEdit:focus {
|
||
|
|
# border: 1px solid #3b82f6;
|
||
|
|
# background: rgba(51, 65, 85, 0.7);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 下拉框样式 ==================== */
|
||
|
|
# QComboBox {
|
||
|
|
# background: rgba(51, 65, 85, 0.5);
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.2);
|
||
|
|
# border-radius: 6px;
|
||
|
|
# padding: 6px;
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# min-height: 30px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QComboBox:hover {
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.4);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QComboBox::drop-down {
|
||
|
|
# border: none;
|
||
|
|
# width: 30px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QComboBox QAbstractItemView {
|
||
|
|
# background: rgba(30, 41, 59, 0.95);
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.3);
|
||
|
|
# border-radius: 6px;
|
||
|
|
# selection-background-color: rgba(59, 130, 246, 0.3);
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 列表样式 ==================== */
|
||
|
|
# QListWidget, QTreeWidget {
|
||
|
|
# background: rgba(30, 41, 59, 0.4);
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.2);
|
||
|
|
# border-radius: 8px;
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# outline: none;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QListWidget::item, QTreeWidget::item {
|
||
|
|
# padding: 8px;
|
||
|
|
# border-radius: 4px;
|
||
|
|
# border: none;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QListWidget::item:hover, QTreeWidget::item:hover {
|
||
|
|
# background: rgba(59, 130, 246, 0.15);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QListWidget::item:selected, QTreeWidget::item:selected {
|
||
|
|
# background: rgba(59, 130, 246, 0.3);
|
||
|
|
# border-left: 3px solid #3b82f6;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 标签页样式 ==================== */
|
||
|
|
# QTabWidget::pane {
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.2);
|
||
|
|
# border-radius: 8px;
|
||
|
|
# background: rgba(30, 41, 59, 0.4);
|
||
|
|
# top: -1px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QTabBar::tab {
|
||
|
|
# background: rgba(51, 65, 85, 0.4);
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.2);
|
||
|
|
# border-bottom: none;
|
||
|
|
# border-radius: 6px 6px 0 0;
|
||
|
|
# padding: 8px 16px;
|
||
|
|
# margin-right: 4px;
|
||
|
|
# color: #94a3b8;
|
||
|
|
# min-width: 80px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QTabBar::tab:hover {
|
||
|
|
# background: rgba(59, 130, 246, 0.15);
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QTabBar::tab:selected {
|
||
|
|
# background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
||
|
|
# stop:0 #3b82f6, stop:1 #2563eb);
|
||
|
|
# color: white;
|
||
|
|
# border-color: #3b82f6;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 进度条样式 ==================== */
|
||
|
|
# QProgressBar {
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.2);
|
||
|
|
# border-radius: 4px;
|
||
|
|
# background: rgba(51, 65, 85, 0.5);
|
||
|
|
# text-align: center;
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# height: 20px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QProgressBar::chunk {
|
||
|
|
# background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
|
||
|
|
# stop:0 #3b82f6, stop:1 #06b6d4);
|
||
|
|
# border-radius: 3px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 复选框样式 ==================== */
|
||
|
|
# QCheckBox {
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# spacing: 8px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QCheckBox::indicator {
|
||
|
|
# width: 18px;
|
||
|
|
# height: 18px;
|
||
|
|
# border: 2px solid rgba(59, 130, 246, 0.4);
|
||
|
|
# border-radius: 4px;
|
||
|
|
# background: rgba(51, 65, 85, 0.5);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QCheckBox::indicator:hover {
|
||
|
|
# border-color: rgba(59, 130, 246, 0.6);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QCheckBox::indicator:checked {
|
||
|
|
# background: #3b82f6;
|
||
|
|
# border-color: #3b82f6;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 单选框样式 ==================== */
|
||
|
|
# QRadioButton {
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# spacing: 8px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QRadioButton::indicator {
|
||
|
|
# width: 18px;
|
||
|
|
# height: 18px;
|
||
|
|
# border: 2px solid rgba(59, 130, 246, 0.4);
|
||
|
|
# border-radius: 9px;
|
||
|
|
# background: rgba(51, 65, 85, 0.5);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QRadioButton::indicator:hover {
|
||
|
|
# border-color: rgba(59, 130, 246, 0.6);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QRadioButton::indicator:checked {
|
||
|
|
# background: #3b82f6;
|
||
|
|
# border-color: #3b82f6;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 滚动条样式 ==================== */
|
||
|
|
# QScrollBar:vertical {
|
||
|
|
# border: none;
|
||
|
|
# background: rgba(30, 41, 59, 0.3);
|
||
|
|
# width: 10px;
|
||
|
|
# border-radius: 5px;
|
||
|
|
# margin: 0;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QScrollBar::handle:vertical {
|
||
|
|
# background: rgba(59, 130, 246, 0.4);
|
||
|
|
# border-radius: 5px;
|
||
|
|
# min-height: 30px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QScrollBar::handle:vertical:hover {
|
||
|
|
# background: rgba(59, 130, 246, 0.6);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
|
||
|
|
# height: 0px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QScrollBar:horizontal {
|
||
|
|
# border: none;
|
||
|
|
# background: rgba(30, 41, 59, 0.3);
|
||
|
|
# height: 10px;
|
||
|
|
# border-radius: 5px;
|
||
|
|
# margin: 0;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QScrollBar::handle:horizontal {
|
||
|
|
# background: rgba(59, 130, 246, 0.4);
|
||
|
|
# border-radius: 5px;
|
||
|
|
# min-width: 30px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QScrollBar::handle:horizontal:hover {
|
||
|
|
# background: rgba(59, 130, 246, 0.6);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
|
||
|
|
# width: 0px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 分组框样式 ==================== */
|
||
|
|
# QGroupBox {
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.2);
|
||
|
|
# border-radius: 8px;
|
||
|
|
# margin-top: 12px;
|
||
|
|
# padding-top: 12px;
|
||
|
|
# color: #60a5fa;
|
||
|
|
# font-weight: bold;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QGroupBox::title {
|
||
|
|
# subcontrol-origin: margin;
|
||
|
|
# subcontrol-position: top left;
|
||
|
|
# padding: 0 8px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 工具栏样式 ==================== */
|
||
|
|
# QToolBar {
|
||
|
|
# background: rgba(15, 23, 42, 0.8);
|
||
|
|
# border: none;
|
||
|
|
# border-bottom: 2px solid rgba(59, 130, 246, 0.3);
|
||
|
|
# spacing: 8px;
|
||
|
|
# padding: 8px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QToolBar::separator {
|
||
|
|
# background: rgba(59, 130, 246, 0.3);
|
||
|
|
# width: 1px;
|
||
|
|
# margin: 0 8px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QToolButton {
|
||
|
|
# background: transparent;
|
||
|
|
# border: none;
|
||
|
|
# border-radius: 4px;
|
||
|
|
# padding: 6px;
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QToolButton:hover {
|
||
|
|
# background: rgba(59, 130, 246, 0.2);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QToolButton:pressed {
|
||
|
|
# background: rgba(59, 130, 246, 0.3);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 状态栏样式 ==================== */
|
||
|
|
# QStatusBar {
|
||
|
|
# background: rgba(15, 23, 42, 0.8);
|
||
|
|
# border-top: 1px solid rgba(59, 130, 246, 0.2);
|
||
|
|
# color: #94a3b8;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 菜单样式 ==================== */
|
||
|
|
# QMenu {
|
||
|
|
# background: rgba(30, 41, 59, 0.95);
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.3);
|
||
|
|
# border-radius: 8px;
|
||
|
|
# padding: 5px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QMenu::item {
|
||
|
|
# padding: 8px 30px 8px 20px;
|
||
|
|
# border-radius: 4px;
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QMenu::item:selected {
|
||
|
|
# background: rgba(59, 130, 246, 0.3);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QMenu::separator {
|
||
|
|
# height: 1px;
|
||
|
|
# background: rgba(59, 130, 246, 0.2);
|
||
|
|
# margin: 5px 10px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 分割器样式 ==================== */
|
||
|
|
# QSplitter::handle {
|
||
|
|
# background: rgba(59, 130, 246, 0.2);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QSplitter::handle:hover {
|
||
|
|
# background: rgba(59, 130, 246, 0.4);
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QSplitter::handle:horizontal {
|
||
|
|
# width: 2px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# QSplitter::handle:vertical {
|
||
|
|
# height: 2px;
|
||
|
|
# }
|
||
|
|
#
|
||
|
|
# /* ==================== 工具提示样式 ==================== */
|
||
|
|
# QToolTip {
|
||
|
|
# background: rgba(30, 41, 59, 0.95);
|
||
|
|
# border: 1px solid rgba(59, 130, 246, 0.3);
|
||
|
|
# border-radius: 6px;
|
||
|
|
# padding: 5px;
|
||
|
|
# color: #e0e6ed;
|
||
|
|
# }
|
||
|
|
# """
|