/** * HIS-GUI 样式管理器 * 负责加载和应用Qt样式表(QSS) */ #ifndef HIS_STYLE_MANAGER_H #define HIS_STYLE_MANAGER_H #include #include #include #include #include #include class HisStyleManager { public: // 加载并应用QSS样式 static void applyStyle(const QString& qssPath) { QFile file(qssPath); if (!file.open(QFile::ReadOnly | QFile::Text)) { qWarning() << "无法打开样式文件:" << qssPath; return; } QTextStream stream(&file); QString stylesheet = stream.readAll(); file.close(); qApp->setStyleSheet(stylesheet); qDebug() << "成功加载样式文件:" << qssPath; } // 从资源或文件加载默认主题 static void applyDefaultStyle() { // 尝试从template目录加载 QStringList possiblePaths = { "gui/template/his_theme.qss", "../gui/template/his_theme.qss", "./gui/template/his_theme.qss", "/home/e2hang/code/HIS-GUI/gui/template/his_theme.qss" }; for (const QString& path : possiblePaths) { QFile file(path); if (file.open(QFile::ReadOnly | QFile::Text)) { QTextStream stream(&file); QString stylesheet = stream.readAll(); file.close(); qApp->setStyleSheet(stylesheet); qDebug() << "成功加载默认样式:" << path; return; } } qWarning() << "未找到默认样式文件,使用系统样式"; } // 应用预设颜色主题 enum class ThemeType { MedicalBlue, // 医疗蓝色主题 ModernDark, // 现代深色主题 LightClean, // 简洁浅色主题 HealthcareGreen, // 医疗绿色主题 Premium, // 精致医疗主题(推荐) PremiumDark // 精致深色主题 }; static void applyTheme(ThemeType type) { QString qss; switch (type) { case ThemeType::MedicalBlue: qss = getMedicalBlueTheme(); break; case ThemeType::ModernDark: qss = getModernDarkTheme(); break; case ThemeType::LightClean: qss = getLightCleanTheme(); break; case ThemeType::HealthcareGreen: qss = getHealthcareGreenTheme(); break; case ThemeType::Premium: qss = getPremiumTheme(); break; case ThemeType::PremiumDark: qss = getPremiumDarkTheme(); break; } qApp->setStyleSheet(qss); } // 从QSS文件加载主题(支持premium_theme.qss) static void applyThemeFromFile(const QString& themeFileName = "premium_theme.qss") { QStringList possiblePaths = { QString("gui/template/%1").arg(themeFileName), QString("../gui/template/%1").arg(themeFileName), QString("./gui/template/%1").arg(themeFileName), QString("/home/e2hang/code/HIS-GUI/gui/template/%1").arg(themeFileName) }; for (const QString& path : possiblePaths) { QFile file(path); if (file.open(QFile::ReadOnly | QFile::Text)) { QTextStream stream(&file); QString stylesheet = stream.readAll(); file.close(); qApp->setStyleSheet(stylesheet); qDebug() << "成功加载主题文件:" << path; return; } } qWarning() << "未找到主题文件:" << themeFileName << ",使用系统样式"; } private: // 医疗蓝色主题 static QString getMedicalBlueTheme() { return R"( QMainWindow, QWidget { background-color: #f5f7fa; font-family: "Microsoft YaHei", "Segoe UI", sans-serif; font-size: 14px; color: #333333; } QListWidget { background-color: #1e3a5f; border: none; border-right: 3px solid #2980b9; padding: 10px 0; } QListWidget::item { color: #b8c9db; padding: 14px 25px; margin: 3px 10px; border-radius: 8px; font-size: 15px; } QListWidget::item:selected { background-color: #2980b9; color: #ffffff; } QListWidget::item:hover:!selected { background-color: #2c5282; color: #ffffff; } QPushButton { background-color: #3498db; color: #ffffff; border: none; border-radius: 6px; padding: 10px 20px; font-weight: 500; } QPushButton:hover { background-color: #2980b9; } QPushButton:pressed { background-color: #1a5276; } QTableWidget, QTableView { background-color: #ffffff; border: 1px solid #d1d8e0; border-radius: 8px; } QHeaderView::section { background-color: #1e3a5f; color: #ffffff; padding: 12px 8px; border: none; font-weight: 600; } QLineEdit, QTextEdit, QPlainTextEdit { background-color: #ffffff; border: 2px solid #d1d8e0; border-radius: 6px; padding: 10px 12px; } QLineEdit:focus, QTextEdit:focus { border-color: #3498db; } QMenuBar { background-color: #1e3a5f; color: #ffffff; padding: 6px 10px; } QMenuBar::item:selected { background-color: #2980b9; } )"; } // 现代深色主题 static QString getModernDarkTheme() { return R"( QMainWindow, QWidget { background-color: #2b2b2b; font-family: "Segoe UI", sans-serif; font-size: 14px; color: #e0e0e0; } QListWidget { background-color: #1e1e1e; border: none; border-right: 3px solid #007acc; padding: 10px 0; } QListWidget::item { color: #cccccc; padding: 12px 20px; margin: 2px 8px; border-radius: 6px; } QListWidget::item:selected { background-color: #007acc; color: #ffffff; } QPushButton { background-color: #007acc; color: #ffffff; border: none; border-radius: 4px; padding: 8px 16px; } QPushButton:hover { background-color: #005a9e; } QTableWidget, QTableView { background-color: #252525; border: 1px solid #3c3c3c; color: #e0e0e0; } QHeaderView::section { background-color: #1e1e1e; color: #ffffff; padding: 10px; border: none; } QLineEdit, QTextEdit { background-color: #333333; border: 1px solid #555555; border-radius: 4px; padding: 8px; color: #e0e0e0; } )"; } // 简洁浅色主题 static QString getLightCleanTheme() { return R"( QMainWindow, QWidget { background-color: #fafafa; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; color: #333333; } QListWidget { background-color: #ffffff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 8px; } QListWidget::item { color: #555555; padding: 10px 15px; margin: 2px; border-radius: 6px; } QListWidget::item:selected { background-color: #4a90e2; color: #ffffff; } QPushButton { background-color: #4a90e2; color: #ffffff; border: none; border-radius: 6px; padding: 10px 20px; } QPushButton:hover { background-color: #357abd; } QTableWidget, QTableView { background-color: #ffffff; border: 1px solid #e8e8e8; border-radius: 8px; } QHeaderView::section { background-color: #f5f5f5; color: #333333; padding: 12px; border: none; border-bottom: 2px solid #4a90e2; } )"; } // 医疗绿色主题 static QString getHealthcareGreenTheme() { return R"( QMainWindow, QWidget { background-color: #f0f7f4; font-family: "Microsoft YaHei", sans-serif; font-size: 14px; color: #2d4a3e; } QListWidget { background-color: #2d5a4a; border: none; border-right: 3px solid #4caf50; padding: 10px 0; } QListWidget::item { color: #a8d5c2; padding: 14px 25px; margin: 3px 10px; border-radius: 8px; font-size: 15px; } QListWidget::item:selected { background-color: #4caf50; color: #ffffff; } QPushButton { background-color: #4caf50; color: #ffffff; border: none; border-radius: 6px; padding: 10px 20px; } QPushButton:hover { background-color: #43a047; } QTableWidget, QTableView { background-color: #ffffff; border: 1px solid #c8e6c9; border-radius: 8px; } QHeaderView::section { background-color: #2d5a4a; color: #ffffff; padding: 12px; border: none; } QLineEdit, QTextEdit { background-color: #ffffff; border: 2px solid #a5d6a7; border-radius: 6px; padding: 10px; } QLineEdit:focus, QTextEdit:focus { border-color: #4caf50; } )"; } // 精致医疗主题 - 完整实现 static QString getPremiumTheme() { return R"( * { outline: none; } QMainWindow, QWidget, QDialog, QFrame { background-color: #f8fafc; font-family: "Inter", "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif; font-size: 14px; color: #1a202c; letter-spacing: 0.01em; } QMainWindow { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #f8fafc 0%, stop:1 #edf2f7 100%); } QMenuBar { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #2d3748 0%, stop:1 #1a202c 100%); color: #f7fafc; padding: 8px 12px; border-bottom: 1px solid #4a5568; } QMenuBar::item { background: transparent; padding: 8px 16px; margin: 0 4px; border-radius: 6px; color: #e2e8f0; } QMenuBar::item:selected { background: rgba(255, 255, 255, 0.1); color: #ffffff; } QMenu { background: rgba(255, 255, 255, 0.98); border: 1px solid rgba(226, 232, 240, 0.8); border-radius: 10px; padding: 8px 4px; } QMenu::item { padding: 10px 32px 10px 20px; border-radius: 6px; margin: 2px 6px; color: #2d3748; } QMenu::item:selected { background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #ebf8ff 0%, stop:1 #e6fffa 100%); color: #234e52; } QToolBar { background: rgba(255, 255, 255, 0.9); border: none; border-bottom: 1px solid #e2e8f0; padding: 10px 16px; spacing: 12px; } QListWidget { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #1a365d 0%, stop:0.5 #2c5282 50%, stop:1 #2b6cb0 100%); border: none; border-right: 1px solid #2c5282; padding: 16px 0; } QListWidget::item { color: #bee3f8; padding: 14px 28px; margin: 4px 12px; border-radius: 10px; font-size: 15px; font-weight: 500; } QListWidget::item:selected { background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255,255,255,0.15) 0%, stop:1 rgba(255,255,255,0.25) 100%); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.2); } QListWidget::item:hover:!selected { background: rgba(255, 255, 255, 0.08); color: #e2e8f0; } QPushButton { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #4299e1 0%, stop:1 #3182ce 100%); color: #ffffff; border: none; border-radius: 8px; padding: 10px 22px; font-size: 14px; font-weight: 500; min-width: 85px; border: 1px solid rgba(66, 153, 225, 0.5); } QPushButton:hover { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #3182ce 0%, stop:1 #2b6cb0 100%); border: 1px solid rgba(66, 153, 225, 0.8); } QPushButton:pressed { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #2b6cb0 0%, stop:1 #2c5282 100%); } QPushButton:disabled { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #cbd5e0 0%, stop:1 #a0aec0 100%); color: #718096; border-color: transparent; } QLineEdit, QTextEdit, QPlainTextEdit { background-color: #ffffff; border: 2px solid #e2e8f0; border-radius: 10px; padding: 12px 16px; color: #1a202c; selection-background-color: #4299e1; selection-color: #ffffff; font-size: 14px; } QLineEdit:hover, QTextEdit:hover { border-color: #cbd5e0; } QLineEdit:focus, QTextEdit:focus { border: 2px solid #4299e1; background-color: #f7fafc; border-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15); } QLineEdit:disabled, QTextEdit:disabled { background-color: #f7fafc; color: #a0aec0; border-color: #e2e8f0; } QComboBox { background-color: #ffffff; border: 2px solid #e2e8f0; border-radius: 10px; padding: 12px 16px; color: #1a202c; min-width: 110px; font-size: 14px; } QComboBox:hover { border-color: #cbd5e0; } QComboBox:focus, QComboBox:on { border: 2px solid #4299e1; border-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15); } QComboBox QAbstractItemView { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 10px; selection-background-color: #ebf8ff; selection-color: #2b6cb0; padding: 8px; } QTableWidget, QTableView { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; gridline-color: #f1f5f9; selection-background-color: #ebf8ff; selection-color: #2b6cb0; outline: 0; } QTableWidget::item, QTableView::item { padding: 14px 12px; border-bottom: 1px solid #f1f5f9; color: #2d3748; } QTableWidget::item:selected, QTableView::item:selected { background-color: #ebf8ff; color: #2b6cb0; } QTableWidget::item:hover, QTableView::item:hover { background-color: #f7fafc; } QHeaderView::section { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #2d3748 0%, stop:1 #1a202c 100%); color: #ffffff; padding: 14px 12px; border: none; border-right: 1px solid #4a5568; font-weight: 600; text-align: left; } QHeaderView::section:last { border-right: none; border-top-right-radius: 12px; } QHeaderView::section:first { border-top-left-radius: 12px; } QHeaderView::section:hover { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #4a5568 0%, stop:1 #2d3748 100%); } QTreeWidget, QTreeView { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; outline: 0; } QTreeWidget::item, QTreeView::item { padding: 10px 8px; border-bottom: 1px solid #f1f5f9; color: #2d3748; } QTreeWidget::item:hover, QTreeView::item:hover { background-color: #f7fafc; } QTreeWidget::item:selected, QTreeView::item:selected { background-color: #ebf8ff; color: #2b6cb0; } QTabWidget::pane { border: 1px solid #e2e8f0; border-radius: 12px; background-color: #ffffff; margin-top: -1px; } QTabBar::tab { background-color: #f7fafc; color: #718096; padding: 12px 28px; margin-right: 4px; border-top-left-radius: 10px; border-top-right-radius: 10px; font-weight: 500; font-size: 14px; border: 1px solid #e2e8f0; border-bottom: none; } QTabBar::tab:selected { background-color: #ffffff; color: #2b6cb0; border: 1px solid #e2e8f0; border-bottom: 2px solid #ffffff; margin-bottom: -1px; } QTabBar::tab:hover:!selected { background-color: #edf2f7; color: #4a5568; } QGroupBox { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; margin-top: 18px; padding: 20px; padding-top: 30px; font-weight: 600; color: #2d3748; } QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top left; left: 20px; padding: 0 14px; background-color: #ffffff; color: #2b6cb0; } QLabel { color: #2d3748; background-color: transparent; } QLabel[heading="true"] { font-size: 20px; font-weight: 700; color: #1a202c; padding: 4px 0; } QLabel[subheading="true"] { font-size: 16px; font-weight: 600; color: #4a5568; padding: 2px 0; } QScrollBar:vertical { background-color: transparent; width: 10px; margin: 8px 4px; border-radius: 5px; } QScrollBar::handle:vertical { background-color: #cbd5e0; border-radius: 5px; min-height: 40px; margin: 0 2px; } QScrollBar::handle:vertical:hover { background-color: #a0aec0; } QScrollBar:horizontal { background-color: transparent; height: 10px; margin: 4px 8px; border-radius: 5px; } QScrollBar::handle:horizontal { background-color: #cbd5e0; border-radius: 5px; min-width: 40px; margin: 2px 0; } QScrollBar::handle:horizontal:hover { background-color: #a0aec0; } QProgressBar { background-color: #edf2f7; border: none; border-radius: 8px; height: 12px; text-align: center; color: #4a5568; font-weight: 600; font-size: 12px; } QProgressBar::chunk { background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #4299e1 0%, stop:1 #48bb78 100%); border-radius: 8px; } QCheckBox { spacing: 12px; color: #2d3748; font-size: 14px; } QCheckBox::indicator { width: 20px; height: 20px; border: 2px solid #cbd5e0; border-radius: 5px; background-color: #ffffff; } QCheckBox::indicator:checked { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #4299e1 0%, stop:1 #3182ce 100%); border-color: #4299e1; } QCheckBox::indicator:hover { border-color: #4299e1; } QRadioButton { spacing: 12px; color: #2d3748; font-size: 14px; } QRadioButton::indicator { width: 20px; height: 20px; border: 2px solid #cbd5e0; border-radius: 10px; background-color: #ffffff; } QRadioButton::indicator:checked { background-color: #ffffff; border-color: #4299e1; border-width: 4px; } QToolTip { background-color: #1a202c; color: #ffffff; border: none; border-radius: 6px; padding: 8px 14px; font-size: 13px; font-weight: 500; } QStatusBar { background-color: #ffffff; border-top: 1px solid #e2e8f0; color: #718096; padding: 8px 12px; font-size: 13px; } QDateEdit, QDateTimeEdit { background-color: #ffffff; border: 2px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; color: #1a202c; font-size: 14px; } QDateEdit:focus, QDateTimeEdit:focus { border: 2px solid #4299e1; border-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15); } QMessageBox { background-color: #ffffff; border-radius: 12px; } QMessageBox QLabel { color: #2d3748; padding: 12px; font-size: 14px; } )"; } // 精致深色主题 static QString getPremiumDarkTheme() { return R"( * { outline: none; } QMainWindow, QWidget, QDialog, QFrame { background-color: #1a202c; font-family: "Inter", "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif; font-size: 14px; color: #e2e8f0; letter-spacing: 0.01em; } QMenuBar { background: #171923; color: #f7fafc; padding: 8px 12px; border-bottom: 1px solid #2d3748; } QMenuBar::item { background: transparent; padding: 8px 16px; margin: 0 4px; border-radius: 6px; color: #e2e8f0; } QMenuBar::item:selected { background: #2d3748; } QMenu { background: #1a202c; border: 1px solid #2d3748; border-radius: 10px; padding: 8px 4px; } QMenu::item { padding: 10px 32px 10px 20px; border-radius: 6px; margin: 2px 6px; color: #e2e8f0; } QMenu::item:selected { background: #2d3748; color: #4299e1; } QToolBar { background: #1a202c; border: none; border-bottom: 1px solid #2d3748; padding: 10px 16px; spacing: 12px; } QListWidget { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #0f172a 0%, stop:1 #1e293b 100%); border: none; border-right: 1px solid #334155; padding: 16px 0; } QListWidget::item { color: #94a3b8; padding: 14px 28px; margin: 4px 12px; border-radius: 10px; font-size: 15px; font-weight: 500; } QListWidget::item:selected { background: #3b82f6; color: #ffffff; border: none; } QListWidget::item:hover:!selected { background: rgba(255, 255, 255, 0.08); color: #cbd5e1; } QPushButton { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #3b82f6 0%, stop:1 #2563eb 100%); color: #ffffff; border: none; border-radius: 8px; padding: 10px 22px; font-size: 14px; font-weight: 500; min-width: 85px; border: 1px solid rgba(59, 130, 246, 0.5); } QPushButton:hover { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #2563eb 0%, stop:1 #1d4ed8 100%); } QPushButton:pressed { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #1d4ed8 0%, stop:1 #1e40af 100%); } QPushButton:disabled { background: #374151; color: #6b7280; border-color: transparent; } QLineEdit, QTextEdit, QPlainTextEdit { background-color: #1f2937; border: 2px solid #374151; border-radius: 10px; padding: 12px 16px; color: #f3f4f6; selection-background-color: #3b82f6; selection-color: #ffffff; font-size: 14px; } QLineEdit:hover, QTextEdit:hover { border-color: #4b5563; } QLineEdit:focus, QTextEdit:focus { border: 2px solid #3b82f6; background-color: #111827; border-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); } QLineEdit:disabled, QTextEdit:disabled { background-color: #1f2937; color: #6b7280; border-color: #374151; } QComboBox { background-color: #1f2937; border: 2px solid #374151; border-radius: 10px; padding: 12px 16px; color: #f3f4f6; min-width: 110px; font-size: 14px; } QComboBox:hover { border-color: #4b5563; } QComboBox:focus, QComboBox:on { border: 2px solid #3b82f6; border-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); } QComboBox QAbstractItemView { background-color: #1f2937; border: 1px solid #374151; border-radius: 10px; selection-background-color: #3b82f6; selection-color: #ffffff; padding: 8px; } QTableWidget, QTableView { background-color: #1f2937; border: 1px solid #374151; border-radius: 12px; gridline-color: #374151; selection-background-color: #3b82f6; selection-color: #ffffff; outline: 0; } QTableWidget::item, QTableView::item { padding: 14px 12px; border-bottom: 1px solid #374151; color: #e5e7eb; } QTableWidget::item:selected, QTableView::item:selected { background-color: #3b82f6; color: #ffffff; } QTableWidget::item:hover, QTableView::item:hover { background-color: #374151; } QHeaderView::section { background: #111827; color: #f9fafb; padding: 14px 12px; border: none; border-right: 1px solid #374151; font-weight: 600; text-align: left; } QHeaderView::section:last { border-right: none; border-top-right-radius: 12px; } QHeaderView::section:first { border-top-left-radius: 12px; } QHeaderView::section:hover { background: #1f2937; } QTreeWidget, QTreeView { background-color: #1f2937; border: 1px solid #374151; border-radius: 12px; padding: 12px; outline: 0; } QTreeWidget::item, QTreeView::item { padding: 10px 8px; border-bottom: 1px solid #374151; color: #e5e7eb; } QTreeWidget::item:hover, QTreeView::item:hover { background-color: #374151; } QTreeWidget::item:selected, QTreeView::item:selected { background-color: #3b82f6; color: #ffffff; } QTabWidget::pane { border: 1px solid #374151; border-radius: 12px; background-color: #1f2937; margin-top: -1px; } QTabBar::tab { background-color: #111827; color: #9ca3af; padding: 12px 28px; margin-right: 4px; border-top-left-radius: 10px; border-top-right-radius: 10px; font-weight: 500; font-size: 14px; border: 1px solid #374151; border-bottom: none; } QTabBar::tab:selected { background-color: #1f2937; color: #3b82f6; border: 1px solid #374151; border-bottom: 2px solid #1f2937; margin-bottom: -1px; } QTabBar::tab:hover:!selected { background-color: #374151; color: #d1d5db; } QGroupBox { background-color: #1f2937; border: 1px solid #374151; border-radius: 12px; margin-top: 18px; padding: 20px; padding-top: 30px; font-weight: 600; color: #e5e7eb; } QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top left; left: 20px; padding: 0 14px; background-color: #1f2937; color: #3b82f6; } QLabel { color: #e5e7eb; background-color: transparent; } QLabel[heading="true"] { font-size: 20px; font-weight: 700; color: #f9fafb; padding: 4px 0; } QLabel[subheading="true"] { font-size: 16px; font-weight: 600; color: #d1d5db; padding: 2px 0; } QScrollBar:vertical { background-color: transparent; width: 10px; margin: 8px 4px; border-radius: 5px; } QScrollBar::handle:vertical { background-color: #4b5563; border-radius: 5px; min-height: 40px; margin: 0 2px; } QScrollBar::handle:vertical:hover { background-color: #6b7280; } QScrollBar:horizontal { background-color: transparent; height: 10px; margin: 4px 8px; border-radius: 5px; } QScrollBar::handle:horizontal { background-color: #4b5563; border-radius: 5px; min-width: 40px; margin: 2px 0; } QScrollBar::handle:horizontal:hover { background-color: #6b7280; } QProgressBar { background-color: #374151; border: none; border-radius: 8px; height: 12px; text-align: center; color: #e5e7eb; font-weight: 600; font-size: 12px; } QProgressBar::chunk { background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #3b82f6 0%, stop:1 #8b5cf6 100%); border-radius: 8px; } QCheckBox { spacing: 12px; color: #e5e7eb; font-size: 14px; } QCheckBox::indicator { width: 20px; height: 20px; border: 2px solid #4b5563; border-radius: 5px; background-color: #1f2937; } QCheckBox::indicator:checked { background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #3b82f6 0%, stop:1 #2563eb 100%); border-color: #3b82f6; } QRadioButton { spacing: 12px; color: #e5e7eb; font-size: 14px; } QRadioButton::indicator { width: 20px; height: 20px; border: 2px solid #4b5563; border-radius: 10px; background-color: #1f2937; } QRadioButton::indicator:checked { background-color: #1f2937; border-color: #3b82f6; border-width: 4px; } QToolTip { background-color: #111827; color: #f9fafb; border: 1px solid #374151; border-radius: 6px; padding: 8px 14px; font-size: 13px; } QStatusBar { background-color: #111827; border-top: 1px solid #374151; color: #9ca3af; padding: 8px 12px; font-size: 13px; } QMessageBox { background-color: #1f2937; border-radius: 12px; } QMessageBox QLabel { color: #e5e7eb; padding: 12px; font-size: 14px; } )"; } }; #endif // HIS_STYLE_MANAGER_H