-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
71 lines (58 loc) · 1.87 KB
/
main.py
File metadata and controls
71 lines (58 loc) · 1.87 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import sys
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QLabel, QVBoxLayout, QApplication
from qfluentwidgets import (
StyleSheetBase,
Theme,
qconfig,
FluentWindow,
setTheme,
FluentIcon,
SubtitleLabel,
NavigationItemPosition,
)
from enum import Enum
from tab.HomeTab import HomeTab
from tab.ListTab import ListTab
from tab.SettingsTab import SettingsTab
class StyleSheet(StyleSheetBase, Enum):
WINDOW = "window"
def path(self, theme=Theme.AUTO):
theme = qconfig.theme if theme == Theme.AUTO else theme
return f"qss/{theme.value.lower()}/{self.value}.qss"
class Window(FluentWindow):
def __init__(self, parent=None):
super().__init__(parent)
self.setObjectName("Window")
self.setWindowTitle("PyShopDL")
self.home_tab = HomeTab(self)
self.list_tab = ListTab(self)
self.settings_tab = SettingsTab(self)
self.addSubInterface(
self.home_tab,
icon=FluentIcon.HOME.icon(Theme.AUTO),
text="Home",
position=NavigationItemPosition.TOP,
)
self.addSubInterface(
self.list_tab,
icon=FluentIcon.LIBRARY.icon(Theme.AUTO),
text="Downloader",
position=NavigationItemPosition.TOP,
)
self.addSubInterface(
self.settings_tab,
icon=FluentIcon.SETTING.icon(Theme.AUTO),
text="Settings",
position=NavigationItemPosition.BOTTOM,
)
StyleSheet.WINDOW.apply(self)
qconfig.themeChangedFinished.connect(lambda: StyleSheet.WINDOW.apply(self))
if __name__ == "__main__":
app = QApplication(sys.argv)
setTheme(Theme.AUTO)
window = Window()
window.resize(900, 600)
window.show()
sys.exit(app.exec())
# SteamDepotDownloader> .\DepotDownloaderMod.exe -app 294100 -pubfile 2222935097