-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
28 lines (22 loc) · 814 Bytes
/
main.py
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
import sys
import os
from PySide6 import QtWidgets
from PySide6.QtWidgets import QApplication
from PySide6.QtGui import QIcon, QPixmap
from utils.dark_theme import get_darkModePalette
from utils.mainwindow import MainWindow
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
# Ensure the icon path is correct
base_path = os.path.abspath(os.path.dirname(__file__))
icon_path = os.path.join(base_path, 'icon', 'icon_f.ico')
app = QApplication(sys.argv + ['-platform', 'windows:darkmode=2'])
app.setStyle('Fusion')
app.setPalette(get_darkModePalette(app))
# Load the icon and resize it to a smaller size
icon = QIcon(QPixmap(icon_path))
app.setWindowIcon(icon)
window = MainWindow(app)
window.setWindowTitle("FLIMPA (v1.1)")
window.setWindowIcon(icon) # Set the window icon here
window.showMaximized()
app.exec()