/* ETL GUI 现代浅色主题样式表 */ /* ========== 全局样式 ========== */ QWidget { font-family: "Microsoft YaHei", "Segoe UI", sans-serif; font-size: 13px; color: #333333; background-color: #f5f5f5; } QMainWindow { background-color: #f5f5f5; } /* ========== 菜单栏 ========== */ QMenuBar { background-color: #ffffff; border-bottom: 1px solid #e0e0e0; padding: 4px; } QMenuBar::item { padding: 6px 12px; background-color: transparent; border-radius: 4px; } QMenuBar::item:selected { background-color: #e8f0fe; } QMenu { background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 4px; } QMenu::item { padding: 8px 24px; border-radius: 4px; } QMenu::item:selected { background-color: #e8f0fe; } /* ========== 工具栏 ========== */ QToolBar { background-color: #ffffff; border-bottom: 1px solid #e0e0e0; padding: 4px; spacing: 4px; } QToolButton { background-color: transparent; border: none; border-radius: 6px; padding: 8px; } QToolButton:hover { background-color: #e8f0fe; } QToolButton:pressed { background-color: #d2e3fc; } /* ========== 按钮 ========== */ QPushButton { background-color: #1a73e8; color: white; border: none; border-radius: 6px; padding: 8px 16px; font-weight: 500; } QPushButton:hover { background-color: #1557b0; } QPushButton:pressed { background-color: #104080; } QPushButton:disabled { background-color: #dadce0; color: #9aa0a6; } QPushButton[secondary="true"] { background-color: #ffffff; color: #1a73e8; border: 1px solid #dadce0; } QPushButton[secondary="true"]:hover { background-color: #f8f9fa; border-color: #1a73e8; } QPushButton[danger="true"] { background-color: #ea4335; } QPushButton[danger="true"]:hover { background-color: #c5221f; } /* ========== 输入框 ========== */ QLineEdit, QTextEdit, QPlainTextEdit { background-color: #ffffff; border: 1px solid #dadce0; border-radius: 6px; padding: 8px 12px; selection-background-color: #d2e3fc; } QLineEdit:focus, QTextEdit:focus, QPlainTextEdit:focus { border-color: #1a73e8; border-width: 2px; padding: 7px 11px; } QLineEdit:disabled, QTextEdit:disabled, QPlainTextEdit:disabled { background-color: #f1f3f4; color: #9aa0a6; } /* ========== 下拉框 ========== */ QComboBox { background-color: #ffffff; border: 1px solid #dadce0; border-radius: 6px; padding: 8px 12px; padding-right: 30px; } QComboBox:hover { border-color: #1a73e8; } QComboBox:focus { border-color: #1a73e8; border-width: 2px; } QComboBox::drop-down { border: none; width: 24px; } QComboBox::down-arrow { image: none; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #5f6368; margin-right: 8px; } QComboBox QAbstractItemView { background-color: #ffffff; border: 1px solid #dadce0; border-radius: 8px; selection-background-color: #e8f0fe; } /* ========== 复选框 ========== */ QCheckBox { spacing: 8px; } QCheckBox::indicator { width: 18px; height: 18px; border-radius: 4px; border: 2px solid #5f6368; } QCheckBox::indicator:checked { background-color: #1a73e8; border-color: #1a73e8; } QCheckBox::indicator:hover { border-color: #1a73e8; } /* ========== 列表和树 ========== */ QListWidget, QTreeWidget, QTableWidget { background-color: #ffffff; border: 1px solid #dadce0; border-radius: 8px; outline: none; } QListWidget::item, QTreeWidget::item { padding: 8px; border-radius: 4px; } QListWidget::item:selected, QTreeWidget::item:selected { background-color: #e8f0fe; color: #1a73e8; } QListWidget::item:hover, QTreeWidget::item:hover { background-color: #f8f9fa; } QHeaderView::section { background-color: #f8f9fa; border: none; border-bottom: 1px solid #dadce0; padding: 10px 16px; font-weight: 600; } QTableWidget { gridline-color: #e8eaed; } QTableWidget::item { padding: 8px; } QTableWidget::item:selected { background-color: #e8f0fe; color: #1a73e8; } /* ========== 滚动条 ========== */ QScrollBar:vertical { background-color: transparent; width: 12px; margin: 0; } QScrollBar::handle:vertical { background-color: #dadce0; border-radius: 6px; min-height: 30px; margin: 2px; } QScrollBar::handle:vertical:hover { background-color: #bdc1c6; } QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical { height: 0; } QScrollBar:horizontal { background-color: transparent; height: 12px; margin: 0; } QScrollBar::handle:horizontal { background-color: #dadce0; border-radius: 6px; min-width: 30px; margin: 2px; } QScrollBar::handle:horizontal:hover { background-color: #bdc1c6; } QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal { width: 0; } /* ========== 选项卡 ========== */ QTabWidget::pane { border: 1px solid #dadce0; border-radius: 8px; background-color: #ffffff; margin-top: -1px; } QTabBar::tab { background-color: transparent; border: none; padding: 10px 20px; margin-right: 4px; color: #5f6368; } QTabBar::tab:selected { color: #1a73e8; border-bottom: 2px solid #1a73e8; } QTabBar::tab:hover:!selected { background-color: #f8f9fa; border-radius: 6px 6px 0 0; } /* ========== 分组框 ========== */ QGroupBox { background-color: #ffffff; border: 1px solid #dadce0; border-radius: 8px; margin-top: 16px; padding: 16px; padding-top: 24px; } QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top left; left: 16px; padding: 0 8px; background-color: #ffffff; color: #5f6368; font-weight: 600; } /* ========== 进度条 ========== */ QProgressBar { background-color: #e8eaed; border: none; border-radius: 4px; height: 8px; text-align: center; } QProgressBar::chunk { background-color: #1a73e8; border-radius: 4px; } /* ========== 分割器 ========== */ QSplitter::handle { background-color: #e0e0e0; } QSplitter::handle:horizontal { width: 2px; } QSplitter::handle:vertical { height: 2px; } QSplitter::handle:hover { background-color: #1a73e8; } /* ========== 状态栏 ========== */ QStatusBar { background-color: #ffffff; border-top: 1px solid #e0e0e0; padding: 4px; } QStatusBar::item { border: none; } /* ========== 提示框 ========== */ QToolTip { background-color: #3c4043; color: #ffffff; border: none; border-radius: 4px; padding: 8px 12px; } /* ========== 消息框 ========== */ QMessageBox { background-color: #ffffff; } /* ========== 导航侧边栏 ========== */ QListWidget#navList { background-color: #ffffff; border: none; border-right: 1px solid #e0e0e0; padding: 8px; } QListWidget#navList::item { padding: 12px 16px; border-radius: 8px; margin: 2px 0; } QListWidget#navList::item:selected { background-color: #e8f0fe; color: #1a73e8; font-weight: 600; } /* ========== 日志查看器 ========== */ QPlainTextEdit#logViewer { font-family: "Consolas", "Courier New", monospace; font-size: 12px; background-color: #fafafa; line-height: 1.5; } /* ========== SQL 编辑器 ========== */ QPlainTextEdit#sqlEditor { font-family: "Consolas", "Courier New", monospace; font-size: 13px; background-color: #ffffff; } /* ========== 卡片样式 ========== */ QFrame[card="true"] { background-color: #ffffff; border: 1px solid #dadce0; border-radius: 12px; padding: 16px; } QFrame[card="true"]:hover { border-color: #1a73e8; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } /* ========== 标签 ========== */ QLabel[heading="true"] { font-size: 18px; font-weight: 600; color: #202124; } QLabel[subheading="true"] { font-size: 14px; color: #5f6368; } QLabel[status="success"] { color: #1e8e3e; font-weight: 500; } QLabel[status="error"] { color: #d93025; font-weight: 500; } QLabel[status="warning"] { color: #f9ab00; font-weight: 500; } QLabel[status="info"] { color: #1a73e8; font-weight: 500; }