-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
47 lines (38 loc) · 1.79 KB
/
Copy pathmain.py
File metadata and controls
47 lines (38 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import os
import sys
# Add path to bundled DLLs (adjust if needed)
dll_dir = os.path.join(os.path.dirname(sys.executable), "weasy_dlls")
os.environ["PATH"] = dll_dir + os.pathsep + os.environ["PATH"]
# Ensure GTK DLLs load properly when running as .exe
if getattr(sys, 'frozen', False):
base_path = sys._MEIPASS
os.environ['PATH'] = base_path + os.pathsep + os.environ['PATH']
from PyQt5.QtWidgets import QApplication
from PyQt5.QtGui import QPalette, QColor
# --- Project Modules ---
from src.ui.windows.main_window import MainWindow
from src.ui.theme import get_global_stylesheet
if __name__ == "__main__":
app = QApplication(sys.argv)
# Set application style
app.setStyle('Fusion')
# Set application stylesheet
app.setStyleSheet(get_global_stylesheet())
# Set application palette for better dark theme support
palette = QPalette()
palette.setColor(QPalette.Window, QColor(15, 23, 42)) # Slate 900
palette.setColor(QPalette.WindowText, QColor(248, 250, 252)) # Slate 50
palette.setColor(QPalette.Base, QColor(30, 41, 59)) # Slate 800
palette.setColor(QPalette.AlternateBase, QColor(15, 23, 42))
palette.setColor(QPalette.ToolTipBase, QColor(15, 23, 42))
palette.setColor(QPalette.ToolTipText, QColor(248, 250, 252))
palette.setColor(QPalette.Text, QColor(248, 250, 252))
palette.setColor(QPalette.Button, QColor(30, 41, 59))
palette.setColor(QPalette.ButtonText, QColor(248, 250, 252))
palette.setColor(QPalette.BrightText, QColor(244, 63, 94)) # Rose 500
palette.setColor(QPalette.Link, QColor(99, 102, 241)) # Indigo 500
palette.setColor(QPalette.Highlight, QColor(99, 102, 241))
palette.setColor(QPalette.HighlightedText, QColor(255, 255, 255))
window = MainWindow()
window.show()
sys.exit(app.exec_())