196 lines
3.2 KiB
Python
196 lines
3.2 KiB
Python
|
|
from PySide6.QtCore import QFile, QTextStream
|
||
|
|
from PySide6.QtWidgets import QApplication
|
||
|
|
|
||
|
|
DARK_STYLE = """
|
||
|
|
QMainWindow {
|
||
|
|
background-color: #1e1e2e;
|
||
|
|
}
|
||
|
|
|
||
|
|
QWidget {
|
||
|
|
background-color: #1e1e2e;
|
||
|
|
color: #cdd6f4;
|
||
|
|
font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
|
||
|
|
font-size: 14px;
|
||
|
|
}
|
||
|
|
|
||
|
|
QLabel#title_label {
|
||
|
|
font-size: 24px;
|
||
|
|
font-weight: bold;
|
||
|
|
color: #89b4fa;
|
||
|
|
}
|
||
|
|
|
||
|
|
QLabel#section_label {
|
||
|
|
font-size: 18px;
|
||
|
|
font-weight: bold;
|
||
|
|
color: #f5c2e7;
|
||
|
|
margin-top: 20px;
|
||
|
|
margin-bottom: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton {
|
||
|
|
background-color: #45475a;
|
||
|
|
color: #cdd6f4;
|
||
|
|
border: none;
|
||
|
|
padding: 10px 20px;
|
||
|
|
border-radius: 8px;
|
||
|
|
font-weight: bold;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton:hover {
|
||
|
|
background-color: #585b70;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton:pressed {
|
||
|
|
background-color: #313244;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#connect_button {
|
||
|
|
background-color: #89b4fa;
|
||
|
|
color: #1e1e2e;
|
||
|
|
font-size: 16px;
|
||
|
|
padding: 12px 30px;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#connect_button:hover {
|
||
|
|
background-color: #b4befe;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#config_button {
|
||
|
|
background-color: #f9e2af;
|
||
|
|
color: #1e1e2e;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#config_button:hover {
|
||
|
|
background-color: #fbf8cc;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#action_button,
|
||
|
|
QPushButton#action_start,
|
||
|
|
QPushButton#action_stop,
|
||
|
|
QPushButton#action_restart {
|
||
|
|
min-width: 70px;
|
||
|
|
padding: 6px 10px;
|
||
|
|
font-size: 12px;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#action_start {
|
||
|
|
background-color: #a6e3a1;
|
||
|
|
color: #1e1e2e;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#action_start:hover {
|
||
|
|
background-color: #94e2d5;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#action_stop {
|
||
|
|
background-color: #f38ba8;
|
||
|
|
color: #1e1e2e;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#action_stop:hover {
|
||
|
|
background-color: #eba0ac;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#action_restart {
|
||
|
|
background-color: #fab387;
|
||
|
|
color: #1e1e2e;
|
||
|
|
}
|
||
|
|
|
||
|
|
QPushButton#action_restart:hover {
|
||
|
|
background-color: #f9c74f;
|
||
|
|
}
|
||
|
|
|
||
|
|
QLineEdit {
|
||
|
|
background-color: #313244;
|
||
|
|
color: #cdd6f4;
|
||
|
|
border: 2px solid #45475a;
|
||
|
|
border-radius: 8px;
|
||
|
|
padding: 10px;
|
||
|
|
selection-background-color: #585b70;
|
||
|
|
}
|
||
|
|
|
||
|
|
QLineEdit:focus {
|
||
|
|
border-color: #89b4fa;
|
||
|
|
}
|
||
|
|
|
||
|
|
QLineEdit:placeholder-text {
|
||
|
|
color: #6c7086;
|
||
|
|
}
|
||
|
|
|
||
|
|
QTableWidget {
|
||
|
|
background-color: #313244;
|
||
|
|
color: #cdd6f4;
|
||
|
|
border: none;
|
||
|
|
border-radius: 12px;
|
||
|
|
gridline-color: #45475a;
|
||
|
|
selection-background-color: #45475a;
|
||
|
|
}
|
||
|
|
|
||
|
|
QHeaderView::section {
|
||
|
|
background-color: #45475a;
|
||
|
|
color: #cdd6f4;
|
||
|
|
padding: 12px;
|
||
|
|
font-weight: bold;
|
||
|
|
border: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
QTableWidget::item {
|
||
|
|
padding: 12px;
|
||
|
|
border-bottom: 1px solid #45475a;
|
||
|
|
}
|
||
|
|
|
||
|
|
QTableWidget::item:selected {
|
||
|
|
background-color: #45475a;
|
||
|
|
}
|
||
|
|
|
||
|
|
QStatusBar {
|
||
|
|
background-color: #313244;
|
||
|
|
color: #a6adc8;
|
||
|
|
padding: 8px;
|
||
|
|
}
|
||
|
|
|
||
|
|
QMessageBox {
|
||
|
|
background-color: #1e1e2e;
|
||
|
|
}
|
||
|
|
|
||
|
|
QDialog {
|
||
|
|
background-color: #1e1e2e;
|
||
|
|
}
|
||
|
|
|
||
|
|
QGroupBox {
|
||
|
|
border: 2px solid #45475a;
|
||
|
|
border-radius: 12px;
|
||
|
|
margin-top: 10px;
|
||
|
|
font-weight: bold;
|
||
|
|
color: #f5c2e7;
|
||
|
|
}
|
||
|
|
|
||
|
|
QGroupBox::title {
|
||
|
|
subcontrol-origin: margin;
|
||
|
|
subcontrol-position: top left;
|
||
|
|
padding: 0 10px;
|
||
|
|
color: #f5c2e7;
|
||
|
|
}
|
||
|
|
"""
|
||
|
|
|
||
|
|
CARD_STYLE = """
|
||
|
|
QFrame#stat_card {
|
||
|
|
background-color: #313244;
|
||
|
|
border-radius: 12px;
|
||
|
|
padding: 16px;
|
||
|
|
border: 1px solid #45475a;
|
||
|
|
}
|
||
|
|
|
||
|
|
QLabel#stat_value {
|
||
|
|
font-size: 28px;
|
||
|
|
font-weight: bold;
|
||
|
|
color: #89b4fa;
|
||
|
|
}
|
||
|
|
|
||
|
|
QLabel#stat_title {
|
||
|
|
font-size: 14px;
|
||
|
|
color: #a6adc8;
|
||
|
|
margin-top: 4px;
|
||
|
|
}
|
||
|
|
"""
|