added white theme, some features to processing and saving

This commit is contained in:
Ayzen
2026-04-13 10:44:01 +03:00
parent 61685d7a4d
commit 5d2f95f959
20 changed files with 295 additions and 48 deletions
+34 -34
View File
@@ -6,19 +6,19 @@ from PyQt6.QtGui import QColor, QPalette
from PyQt6.QtWidgets import QApplication, QStyleFactory
_DARK_STYLESHEET = """
_LIGHT_STYLESHEET = """
QMainWindow, QDialog {
background-color: #0f131a;
background-color: #f3f6fb;
}
QWidget {
color: #e7edf7;
color: #1f2937;
font-size: 13px;
}
QGroupBox {
background-color: #151b24;
border: 1px solid #263142;
background-color: #ffffff;
border: 1px solid #d7dee8;
border-radius: 10px;
margin-top: 14px;
padding: 10px;
@@ -28,39 +28,39 @@ QGroupBox::title {
subcontrol-origin: margin;
left: 10px;
padding: 0 6px;
color: #9fb4ce;
color: #526277;
font-weight: 600;
}
QPushButton {
background-color: #1d2735;
border: 1px solid #314055;
background-color: #f8fafc;
border: 1px solid #cad4e1;
border-radius: 8px;
padding: 7px 12px;
}
QPushButton:hover {
background-color: #243246;
background-color: #eef3f9;
}
QPushButton:pressed {
background-color: #1a2432;
background-color: #e4ebf4;
}
QPushButton:checked {
background-color: #2f7ee6;
border-color: #5d88bd;
border-color: #2f7ee6;
color: #ffffff;
}
QPushButton:checked:hover {
background-color: #3c89ee;
background-color: #3b8bf4;
}
QPushButton:disabled {
color: #6b7d95;
background-color: #151d27;
border-color: #232e3d;
color: #98a4b3;
background-color: #f3f5f8;
border-color: #dde4ec;
}
QPushButton#settingsToggleButton {
@@ -83,11 +83,11 @@ QTextEdit,
QComboBox,
QSpinBox,
QDoubleSpinBox {
background-color: #101721;
border: 1px solid #2e3b4e;
background-color: #ffffff;
border: 1px solid #c9d4e1;
border-radius: 7px;
padding: 5px 8px;
selection-background-color: #2f7ee6;
selection-background-color: #cfe3ff;
}
QLineEdit:focus,
@@ -96,7 +96,7 @@ QTextEdit:focus,
QComboBox:focus,
QSpinBox:focus,
QDoubleSpinBox:focus {
border: 1px solid #5d88bd;
border: 1px solid #2f7ee6;
}
QTextEdit#runtimeLogBox {
@@ -116,34 +116,34 @@ QScrollArea {
}
QLabel#statusLabel {
color: #94b4d9;
color: #35507a;
font-weight: 600;
padding: 2px 1px;
}
QLabel#hintLabel {
color: #7f94af;
color: #6c7b8d;
}
"""
def apply_dark_theme(app: QApplication) -> None:
"""Apply a minimal modern dark theme shared by all windows."""
def apply_light_theme(app: QApplication) -> None:
"""Apply a minimal light theme shared by all windows."""
app.setStyle(QStyleFactory.create("Fusion"))
palette = QPalette()
palette.setColor(QPalette.ColorRole.Window, QColor("#0f131a"))
palette.setColor(QPalette.ColorRole.WindowText, QColor("#e7edf7"))
palette.setColor(QPalette.ColorRole.Base, QColor("#101721"))
palette.setColor(QPalette.ColorRole.AlternateBase, QColor("#151b24"))
palette.setColor(QPalette.ColorRole.ToolTipBase, QColor("#151b24"))
palette.setColor(QPalette.ColorRole.ToolTipText, QColor("#e7edf7"))
palette.setColor(QPalette.ColorRole.Text, QColor("#e7edf7"))
palette.setColor(QPalette.ColorRole.Button, QColor("#1d2735"))
palette.setColor(QPalette.ColorRole.ButtonText, QColor("#e7edf7"))
palette.setColor(QPalette.ColorRole.Window, QColor("#f3f6fb"))
palette.setColor(QPalette.ColorRole.WindowText, QColor("#1f2937"))
palette.setColor(QPalette.ColorRole.Base, QColor("#ffffff"))
palette.setColor(QPalette.ColorRole.AlternateBase, QColor("#eef3f8"))
palette.setColor(QPalette.ColorRole.ToolTipBase, QColor("#ffffff"))
palette.setColor(QPalette.ColorRole.ToolTipText, QColor("#1f2937"))
palette.setColor(QPalette.ColorRole.Text, QColor("#1f2937"))
palette.setColor(QPalette.ColorRole.Button, QColor("#f8fafc"))
palette.setColor(QPalette.ColorRole.ButtonText, QColor("#1f2937"))
palette.setColor(QPalette.ColorRole.BrightText, QColor("#ffffff"))
palette.setColor(QPalette.ColorRole.Link, QColor("#5d88bd"))
palette.setColor(QPalette.ColorRole.Link, QColor("#2f7ee6"))
palette.setColor(QPalette.ColorRole.Highlight, QColor("#2f7ee6"))
palette.setColor(QPalette.ColorRole.HighlightedText, QColor("#ffffff"))
app.setPalette(palette)
app.setStyleSheet(_DARK_STYLESHEET)
app.setStyleSheet(_LIGHT_STYLESHEET)