616 lines
11 KiB
Plaintext
616 lines
11 KiB
Plaintext
/* VS暗黑/Atom风格 QSS样式表 - 优化中文显示版 */
|
||
QMainWindow, QDialog, QWidget {
|
||
background-color: #1e1e1e;
|
||
color: #d4d4d4;
|
||
font-family: "Microsoft YaHei UI", "Segoe UI", "PingFang SC", sans-serif;
|
||
font-size: 13px;
|
||
border: none;
|
||
}
|
||
|
||
/* 菜单栏 */
|
||
QMenuBar {
|
||
background-color: #2d2d30;
|
||
color: #cccccc;
|
||
border-bottom: 1px solid #3e3e42;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QMenuBar::item {
|
||
background: transparent;
|
||
padding: 5px 10px;
|
||
}
|
||
|
||
QMenuBar::item:selected {
|
||
background: #3e3e42;
|
||
}
|
||
|
||
QMenuBar::item:pressed {
|
||
background: #007acc;
|
||
}
|
||
|
||
/* 菜单 */
|
||
QMenu {
|
||
background-color: #2d2d30;
|
||
color: #cccccc;
|
||
border: 1px solid #3e3e42;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QMenu::item {
|
||
padding: 6px 25px 6px 20px;
|
||
}
|
||
|
||
QMenu::item:selected {
|
||
background-color: #3e3e42;
|
||
color: #ffffff;
|
||
}
|
||
|
||
QMenu::item:disabled {
|
||
color: #656565;
|
||
}
|
||
|
||
QMenu::separator {
|
||
height: 1px;
|
||
background-color: #3e3e42;
|
||
margin: 5px 0px;
|
||
}
|
||
|
||
/* 工具栏 */
|
||
QToolBar {
|
||
background-color: #2d2d30;
|
||
border: none;
|
||
spacing: 5px;
|
||
padding: 3px;
|
||
}
|
||
|
||
QToolBar::handle {
|
||
background-color: #3e3e42;
|
||
width: 10px;
|
||
}
|
||
|
||
/* 状态栏 */
|
||
QStatusBar {
|
||
background-color: #007acc;
|
||
color: #ffffff;
|
||
font-size: 12px;
|
||
}
|
||
|
||
QStatusBar::item {
|
||
border: none;
|
||
}
|
||
|
||
/* 按钮 */
|
||
QPushButton {
|
||
background-color: #0e639c;
|
||
color: #ffffff;
|
||
border: none;
|
||
border-radius: 3px;
|
||
padding: 6px 16px;
|
||
min-width: 60px;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QPushButton:hover {
|
||
background-color: #1177bb;
|
||
}
|
||
|
||
QPushButton:pressed {
|
||
background-color: #0c5a8c;
|
||
}
|
||
|
||
QPushButton:disabled {
|
||
background-color: #3e3e42;
|
||
color: #7a7a7a;
|
||
}
|
||
|
||
QPushButton:focus {
|
||
outline: 0;
|
||
}
|
||
QPushButton:pressed {
|
||
outline: 0;
|
||
}
|
||
|
||
/* === 专为图标按钮:stateButton / userManagerButton 的统一样式(支持QPushButton与QToolButton) === */
|
||
QPushButton#stateButton,
|
||
QToolButton#stateButton,
|
||
QPushButton#userManagerButton {
|
||
background: transparent;
|
||
border: none;
|
||
padding: 0px;
|
||
margin: 0px;
|
||
min-width: 0px;
|
||
border-radius: 6px;
|
||
}
|
||
|
||
/* 悬浮与按下为蓝色系半透明,保持与全局蓝色主色一致 */
|
||
QPushButton#stateButton:hover,
|
||
QToolButton#stateButton:hover,
|
||
QPushButton#userManagerButton:hover {
|
||
background-color: rgba(0, 122, 204, 0.18);
|
||
}
|
||
QPushButton#stateButton:pressed,
|
||
QToolButton#stateButton:pressed,
|
||
QPushButton#userManagerButton:pressed {
|
||
background-color: rgba(0, 122, 204, 0.30);
|
||
}
|
||
|
||
/* 明确图标尺寸(与UI设置一致,可按需调整) */
|
||
QPushButton#stateButton,
|
||
QToolButton#stateButton {
|
||
qproperty-iconSize: 64px 64px;
|
||
}
|
||
QPushButton#userManagerButton {
|
||
qproperty-iconSize: 40px 40px;
|
||
}
|
||
|
||
/* 工具栏按钮 */
|
||
QToolButton {
|
||
background-color: transparent;
|
||
border: 1px solid transparent;
|
||
border-radius: 3px;
|
||
padding: 3px;
|
||
}
|
||
|
||
QToolButton:hover {
|
||
background-color: #3e3e42;
|
||
border: 1px solid #3e3e42;
|
||
}
|
||
|
||
QToolButton:pressed {
|
||
background-color: #007acc;
|
||
}
|
||
|
||
QToolButton:checked {
|
||
background-color: #007acc;
|
||
}
|
||
|
||
/* 复选框 */
|
||
QCheckBox {
|
||
color: #d4d4d4;
|
||
spacing: 8px;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QCheckBox::indicator {
|
||
width: 16px;
|
||
height: 16px;
|
||
}
|
||
|
||
QCheckBox::indicator:unchecked {
|
||
border: 1px solid #3e3e42;
|
||
background-color: #252526;
|
||
}
|
||
|
||
QCheckBox::indicator:checked {
|
||
border: 1px solid #007acc;
|
||
background-color: #007acc;
|
||
image: url(:/Resources/icons/checkmark.png);
|
||
}
|
||
|
||
QCheckBox::indicator:disabled {
|
||
border: 1px solid #3e3e42;
|
||
background-color: #2d2d30;
|
||
}
|
||
|
||
/* 单选框 */
|
||
QRadioButton {
|
||
color: #d4d4d4;
|
||
spacing: 8px;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QRadioButton::indicator {
|
||
width: 16px;
|
||
height: 16px;
|
||
border-radius: 8px;
|
||
}
|
||
|
||
QRadioButton::indicator:unchecked {
|
||
border: 1px solid #3e3e42;
|
||
background-color: #252526;
|
||
}
|
||
|
||
QRadioButton::indicator:checked {
|
||
border: 1px solid #007acc;
|
||
background-color: #007acc;
|
||
}
|
||
|
||
QRadioButton::indicator:disabled {
|
||
border: 1px solid #3e3e42;
|
||
background-color: #2d2d30;
|
||
}
|
||
|
||
/* 组合框 */
|
||
QComboBox {
|
||
background-color: #252526;
|
||
color: #d4d4d4;
|
||
border: 1px solid #3e3e42;
|
||
border-radius: 3px;
|
||
padding: 5px 10px;
|
||
min-width: 75px;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QComboBox:hover {
|
||
border: 1px solid #007acc;
|
||
}
|
||
|
||
QComboBox:editable {
|
||
background: #1e1e1e;
|
||
}
|
||
|
||
QComboBox::drop-down {
|
||
subcontrol-origin: padding;
|
||
subcontrol-position: top right;
|
||
width: 22px;
|
||
border-left: 1px solid #3e3e42;
|
||
}
|
||
|
||
QComboBox::down-arrow {
|
||
image: url(:/Resources/icons/down_arrow_light.svg);
|
||
width: 14px;
|
||
height: 14px;
|
||
right: 4px;
|
||
subcontrol-origin: padding;
|
||
subcontrol-position: center right;
|
||
}
|
||
|
||
QComboBox QAbstractItemView {
|
||
background-color: #252526;
|
||
color: #d4d4d4;
|
||
selection-background-color: #007acc;
|
||
selection-color: #ffffff;
|
||
border: 1px solid #3e3e42;
|
||
outline: 0;
|
||
font-size: 13px;
|
||
}
|
||
|
||
/* 自定义ComboBoxItem样式 - 修复删除按钮问题 */
|
||
ComboBoxItem {
|
||
background-color: transparent;
|
||
border: none;
|
||
outline: 0;
|
||
min-height: 25px;
|
||
max-height: 25px;
|
||
}
|
||
|
||
ComboBoxItem QLabel {
|
||
color: #d4d4d4;
|
||
background-color: transparent;
|
||
border: none;
|
||
font-size: 13px;
|
||
padding-left: 5px;
|
||
}
|
||
|
||
ComboBoxItem QPushButton {
|
||
background: transparent;
|
||
border: none;
|
||
outline: 0;
|
||
min-width: 20px;
|
||
max-width: 20px;
|
||
min-height: 20px;
|
||
max-height: 20px;
|
||
border-radius: 10px;
|
||
margin: 0px 2px;
|
||
padding: 0px;
|
||
}
|
||
|
||
ComboBoxItem QPushButton:hover {
|
||
background-color: rgba(200, 200, 200, 50);
|
||
border-radius: 10px;
|
||
}
|
||
|
||
ComboBoxItem QPushButton:pressed {
|
||
background-color: rgba(0, 122, 204, 100);
|
||
border-radius: 10px;
|
||
}
|
||
|
||
ComboBoxItem QPushButton:focus {
|
||
outline: 0;
|
||
}
|
||
|
||
/* 确保QListWidget中的ComboBoxItem正确显示 */
|
||
QListWidget::item {
|
||
background-color: transparent;
|
||
border: none;
|
||
outline: 0;
|
||
padding: 0px;
|
||
margin: 0px;
|
||
}
|
||
|
||
QListWidget::item:hover {
|
||
background-color: #2a2d2e;
|
||
}
|
||
|
||
QListWidget::item:selected {
|
||
background-color: #094771;
|
||
}
|
||
|
||
/* 滚动条 */
|
||
QScrollBar {
|
||
background: transparent;
|
||
outline: 0;
|
||
border: none;
|
||
}
|
||
QScrollBar:focus {
|
||
outline: 0;
|
||
}
|
||
QScrollBar::add-page, QScrollBar::sub-page {
|
||
background: transparent;
|
||
}
|
||
QScrollBar:vertical {
|
||
background: transparent;
|
||
width: 12px;
|
||
margin: 0px;
|
||
}
|
||
|
||
QScrollBar::handle:vertical {
|
||
background: #424245;
|
||
min-height: 20px;
|
||
border-radius: 6px;
|
||
margin: 2px;
|
||
}
|
||
|
||
QScrollBar::handle:vertical:hover {
|
||
background: #4c4c4f;
|
||
}
|
||
|
||
QScrollBar::handle:vertical:pressed {
|
||
background: #007acc;
|
||
}
|
||
|
||
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
|
||
height: 0px;
|
||
}
|
||
|
||
QScrollBar:horizontal {
|
||
background: transparent;
|
||
height: 12px;
|
||
margin: 0px;
|
||
}
|
||
|
||
QScrollBar::handle:horizontal {
|
||
background: #424245;
|
||
min-width: 20px;
|
||
border-radius: 6px;
|
||
margin: 2px;
|
||
}
|
||
|
||
QScrollBar::handle:horizontal:hover {
|
||
background: #4c4c4f;
|
||
}
|
||
|
||
QScrollBar::handle:horizontal:pressed {
|
||
background: #007acc;
|
||
}
|
||
|
||
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
|
||
width: 0px;
|
||
}
|
||
|
||
/* 滑块 */
|
||
QSlider::groove:horizontal {
|
||
background: #3e3e42;
|
||
height: 4px;
|
||
border-radius: 2px;
|
||
}
|
||
|
||
QSlider::handle:horizontal {
|
||
background: #007acc;
|
||
border: none;
|
||
height: 12px;
|
||
width: 12px;
|
||
border-radius: 6px;
|
||
margin: -4px 0;
|
||
}
|
||
|
||
QSlider::handle:horizontal:hover {
|
||
background: #1c97ea;
|
||
}
|
||
|
||
QSlider::groove:vertical {
|
||
background: #3e3e42;
|
||
width: 4px;
|
||
border-radius: 2px;
|
||
}
|
||
|
||
QSlider::handle:vertical {
|
||
background: #007acc;
|
||
border: none;
|
||
width: 12px;
|
||
height: 12px;
|
||
border-radius: 6px;
|
||
margin: 0 -4px;
|
||
}
|
||
|
||
QSlider::handle:vertical:hover {
|
||
background: #1c97ea;
|
||
}
|
||
|
||
/* 进度条 */
|
||
QProgressBar {
|
||
background-color: #3e3e42;
|
||
color: #d4d4d4;
|
||
border: none;
|
||
border-radius: 3px;
|
||
text-align: center;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QProgressBar::chunk {
|
||
background-color: #007acc;
|
||
border-radius: 3px;
|
||
}
|
||
|
||
/* 分页控件 */
|
||
QTabWidget::pane {
|
||
background-color: #1e1e1e;
|
||
border: 1px solid #3e3e42;
|
||
}
|
||
|
||
QTabBar::tab {
|
||
background-color: #2d2d30;
|
||
color: #cccccc;
|
||
padding: 8px 15px;
|
||
border: none;
|
||
border-bottom: 2px solid transparent;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QTabBar::tab:selected {
|
||
background-color: #1e1e1e;
|
||
color: #ffffff;
|
||
border-bottom: 2px solid #007acc;
|
||
}
|
||
|
||
QTabBar::tab:hover:!selected {
|
||
background-color: #3e3e42;
|
||
}
|
||
|
||
QTabBar::close-button {
|
||
image: url(:/Resources/icons/close.png);
|
||
subcontrol-position: right;
|
||
}
|
||
|
||
QTabBar::close-button:hover {
|
||
background-color: #e81123;
|
||
}
|
||
|
||
/* 分组框 */
|
||
QGroupBox {
|
||
font-weight: bold;
|
||
border: 1px solid #3e3e42;
|
||
border-radius: 3px;
|
||
margin-top: 1ex;
|
||
padding-top: 10px;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QGroupBox::title {
|
||
subcontrol-origin: margin;
|
||
subcontrol-position: top center;
|
||
padding: 0 5px;
|
||
}
|
||
|
||
/* 文本框 */
|
||
QLineEdit, QTextEdit, QPlainTextEdit {
|
||
background-color: #252526;
|
||
color: #d4d4d4;
|
||
border: 1px solid #3e3e42;
|
||
border-radius: 3px;
|
||
padding: 5px;
|
||
selection-background-color: #007acc;
|
||
selection-color: #ffffff;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QLineEdit:focus, QTextEdit:focus, QPlainTextEdit:focus {
|
||
border: 1px solid #007acc;
|
||
}
|
||
|
||
/* 列表视图 */
|
||
QListView, QTreeView, QTableView {
|
||
background-color: #252526;
|
||
color: #d4d4d4;
|
||
border: 1px solid #3e3e42;
|
||
border-radius: 3px;
|
||
outline: 0;
|
||
selection-background-color: #007acc;
|
||
selection-color: #ffffff;
|
||
alternate-background-color: #2d2d30;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QHeaderView::section {
|
||
background-color: #2d2d30;
|
||
color: #cccccc;
|
||
padding: 5px;
|
||
border: none;
|
||
border-right: 1px solid #3e3e42;
|
||
font-size: 13px;
|
||
}
|
||
|
||
QHeaderView::section:last {
|
||
border-right: none;
|
||
}
|
||
|
||
QHeaderView::section:checked {
|
||
background-color: #007acc;
|
||
color: #ffffff;
|
||
}
|
||
|
||
/* 分割线 */
|
||
QSplitter::handle {
|
||
background-color: #2d2d30;
|
||
}
|
||
|
||
QSplitter::handle:hover {
|
||
background-color: #007acc;
|
||
}
|
||
|
||
QSplitter::handle:horizontal {
|
||
width: 5px;
|
||
}
|
||
|
||
QSplitter::handle:vertical {
|
||
height: 5px;
|
||
}
|
||
|
||
/* 停靠窗口 */
|
||
QDockWidget {
|
||
background-color: #2d2d30;
|
||
color: #cccccc;
|
||
border: 1px solid #3e3e42;
|
||
titlebar-close-icon: url(:/Resources/icons/close.png);
|
||
titlebar-normal-icon: url(:/Resources/icons/restore.png);
|
||
font-size: 13px;
|
||
}
|
||
|
||
QDockWidget::title {
|
||
background-color: #2d2d30;
|
||
padding: 5px;
|
||
text-align: center;
|
||
}
|
||
|
||
QDockWidget::close-button, QDockWidget::float-button {
|
||
background-color: transparent;
|
||
border: none;
|
||
padding: 0px;
|
||
icon-size: 12px;
|
||
}
|
||
|
||
QDockWidget::close-button:hover, QDockWidget::float-button:hover {
|
||
background-color: #3e3e42;
|
||
}
|
||
|
||
/* 工具提示 */
|
||
QToolTip {
|
||
background-color: #007acc;
|
||
color: #ffffff;
|
||
border: 1px solid #007acc;
|
||
border-radius: 3px;
|
||
padding: 5px;
|
||
font-size: 13px;
|
||
font-family: "Microsoft YaHei UI", "Segoe UI", "PingFang SC", sans-serif;
|
||
}
|
||
|
||
/* 表格表头(更高优先级,覆盖默认白色的行号列头与角按钮) */
|
||
QTableView QHeaderView::section {
|
||
background-color: #2d2d30;
|
||
color: #cccccc;
|
||
border: none;
|
||
border-right: 1px solid #3e3e42;
|
||
border-bottom: 1px solid #3e3e42;
|
||
}
|
||
QTableView QHeaderView::section:horizontal {
|
||
background-color: #2d2d30;
|
||
color: #cccccc;
|
||
}
|
||
QTableView QHeaderView::section:vertical {
|
||
background-color: #2d2d30;
|
||
color: #cccccc;
|
||
}
|
||
QTableView QTableCornerButton::section {
|
||
background-color: #2d2d30;
|
||
border: 1px solid #3e3e42;
|
||
} |