1. light 主题 palette 改用显式颜色(QPalette::Window #ffffff 等), 替代 standardPalette(),后者在 Fusion 风格下可能返回不正确的颜色 2. QTabWidget::pane 移除 border-radius,Fusion 风格下圆角会导致 裁剪区域渲染为黑色 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
303 lines
5.5 KiB
Plaintext
303 lines
5.5 KiB
Plaintext
/* Impress Voice Input - 亮色主题样式表 */
|
|
|
|
/* ========== 全局 ========== */
|
|
* {
|
|
font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
|
|
}
|
|
|
|
/* 不用 QWidget/QFrame 全局背景色,由 QPalette 处理,避免黑色方块 */
|
|
|
|
/* ========== QTabWidget ========== */
|
|
QTabWidget::pane {
|
|
border: 1px solid #e0e0e0;
|
|
background: #ffffff;
|
|
}
|
|
|
|
QTabBar::tab {
|
|
background: #f5f5f5;
|
|
border: 1px solid #e0e0e0;
|
|
border-bottom: none;
|
|
border-top-left-radius: 6px;
|
|
border-top-right-radius: 6px;
|
|
padding: 10px 24px;
|
|
margin-right: 2px;
|
|
font-size: 14px;
|
|
color: #666666;
|
|
}
|
|
|
|
QTabBar::tab:selected {
|
|
background: #ffffff;
|
|
border-bottom: 2px solid #1976d2;
|
|
color: #1976d2;
|
|
font-weight: bold;
|
|
}
|
|
|
|
QTabBar::tab:hover {
|
|
color: #1976d2;
|
|
background: #e8eaf6;
|
|
}
|
|
|
|
/* ========== QPushButton ========== */
|
|
QPushButton {
|
|
background-color: #ffffff;
|
|
border: 1px solid #d0d0d0;
|
|
border-radius: 4px;
|
|
padding: 6px 16px;
|
|
color: #333333;
|
|
font-size: 13px;
|
|
}
|
|
|
|
QPushButton:hover {
|
|
background-color: #e3f2fd;
|
|
border-color: #1976d2;
|
|
color: #1976d2;
|
|
}
|
|
|
|
QPushButton:pressed {
|
|
background-color: #bbdefb;
|
|
}
|
|
|
|
/* 主要操作按钮 */
|
|
QPushButton[objectName="saveBtn"],
|
|
QPushButton[text="保存配置"] {
|
|
background-color: #1976d2;
|
|
color: #ffffff;
|
|
border: 1px solid #1976d2;
|
|
}
|
|
|
|
QPushButton[objectName="saveBtn"]:hover,
|
|
QPushButton[text="保存配置"]:hover {
|
|
background-color: #1565c0;
|
|
}
|
|
|
|
/* 危险操作按钮 */
|
|
QPushButton[text="停止"],
|
|
QPushButton[text="停止录音"] {
|
|
background-color: #e53935;
|
|
color: #ffffff;
|
|
border: 1px solid #e53935;
|
|
}
|
|
|
|
QPushButton[text="停止"]:hover,
|
|
QPushButton[text="停止录音"]:hover {
|
|
background-color: #c62828;
|
|
}
|
|
|
|
/* ========== QGroupBox ========== */
|
|
QGroupBox {
|
|
font-weight: bold;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 6px;
|
|
margin-top: 12px;
|
|
padding-top: 16px;
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
QGroupBox::title {
|
|
subcontrol-origin: margin;
|
|
subcontrol-position: top left;
|
|
padding: 0 8px;
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
/* ========== QLabel ========== */
|
|
QLabel {
|
|
color: #333333;
|
|
background: none;
|
|
}
|
|
|
|
/* ========== QLineEdit ========== */
|
|
QLineEdit {
|
|
border: 1px solid #d0d0d0;
|
|
border-radius: 4px;
|
|
padding: 5px 10px;
|
|
background: #ffffff;
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
QLineEdit:focus {
|
|
border-color: #1976d2;
|
|
}
|
|
|
|
QLineEdit[readOnly="true"] {
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
/* ========== QComboBox ========== */
|
|
QComboBox {
|
|
border: 1px solid #d0d0d0;
|
|
border-radius: 4px;
|
|
padding: 5px 10px;
|
|
background: #ffffff;
|
|
color: #1a1a1a;
|
|
min-width: 120px;
|
|
}
|
|
|
|
QComboBox:hover {
|
|
border-color: #909090;
|
|
}
|
|
|
|
QComboBox:focus {
|
|
border-color: #1976d2;
|
|
}
|
|
|
|
QComboBox::drop-down {
|
|
border: none;
|
|
width: 24px;
|
|
}
|
|
|
|
QComboBox QAbstractItemView {
|
|
background-color: #ffffff;
|
|
color: #1a1a1a;
|
|
selection-background-color: #e3f2fd;
|
|
}
|
|
|
|
/* ========== QSpinBox / QDoubleSpinBox ========== */
|
|
QSpinBox, QDoubleSpinBox {
|
|
border: 1px solid #d0d0d0;
|
|
border-radius: 4px;
|
|
padding: 4px 8px;
|
|
background: #ffffff;
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
QSpinBox:focus, QDoubleSpinBox:focus {
|
|
border-color: #1976d2;
|
|
}
|
|
|
|
/* ========== QProgressBar ========== */
|
|
QProgressBar {
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 4px;
|
|
text-align: center;
|
|
height: 20px;
|
|
background: #f5f5f5;
|
|
color: #333333;
|
|
}
|
|
|
|
QProgressBar::chunk {
|
|
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
|
|
stop:0 #1976d2, stop:1 #42a5f5);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
/* ========== QTextEdit ========== */
|
|
QTextEdit {
|
|
border: 1px solid #d0d0d0;
|
|
border-radius: 4px;
|
|
padding: 8px;
|
|
background: #ffffff;
|
|
color: #1a1a1a;
|
|
selection-background-color: #e3f2fd;
|
|
}
|
|
|
|
QTextEdit:focus {
|
|
border-color: #1976d2;
|
|
}
|
|
|
|
/* ========== QListWidget ========== */
|
|
QListWidget {
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 4px;
|
|
background: #ffffff;
|
|
padding: 4px;
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
QListWidget::item {
|
|
padding: 8px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
QListWidget::item:selected {
|
|
background-color: #e3f2fd;
|
|
color: #1976d2;
|
|
}
|
|
|
|
QListWidget::item:hover {
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
/* ========== QCheckBox ========== */
|
|
QCheckBox {
|
|
spacing: 8px;
|
|
color: #333333;
|
|
}
|
|
|
|
QCheckBox::indicator {
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 1px solid #d0d0d0;
|
|
border-radius: 3px;
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
QCheckBox::indicator:checked {
|
|
background-color: #1976d2;
|
|
border-color: #1976d2;
|
|
}
|
|
|
|
/* ========== QMenu / QMenuBar ========== */
|
|
QMenuBar {
|
|
background-color: #ffffff;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
padding: 2px;
|
|
color: #333333;
|
|
}
|
|
|
|
QMenuBar::item:selected {
|
|
background-color: #e3f2fd;
|
|
color: #1976d2;
|
|
}
|
|
|
|
QMenu {
|
|
background-color: #ffffff;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 4px;
|
|
padding: 4px;
|
|
color: #333333;
|
|
}
|
|
|
|
QMenu::item:selected {
|
|
background-color: #e3f2fd;
|
|
color: #1976d2;
|
|
}
|
|
|
|
QMenu::separator {
|
|
height: 1px;
|
|
background-color: #e0e0e0;
|
|
margin: 4px 0;
|
|
}
|
|
|
|
/* ========== QMessageBox ========== */
|
|
QMessageBox {
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
QMessageBox QLabel {
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
/* ========== 滚动条 ========== */
|
|
QScrollBar:vertical {
|
|
border: none;
|
|
background: #f5f5f5;
|
|
width: 8px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
QScrollBar::handle:vertical {
|
|
background: #bdbdbd;
|
|
border-radius: 4px;
|
|
min-height: 30px;
|
|
}
|
|
|
|
QScrollBar::handle:vertical:hover {
|
|
background: #9e9e9e;
|
|
}
|
|
|
|
QScrollBar::add-line:vertical,
|
|
QScrollBar::sub-line:vertical {
|
|
height: 0;
|
|
}
|