From f94e129cbaab50b7e1757061a14c5f42d976420f Mon Sep 17 00:00:00 2001 From: DLmaster Date: Sat, 4 Jan 2025 14:22:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=AF=E5=8A=A8=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ui/main_window.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/ui/main_window.py b/app/ui/main_window.py index 18e85f0..7dd66f3 100644 --- a/app/ui/main_window.py +++ b/app/ui/main_window.py @@ -50,6 +50,7 @@ from qfluentwidgets import ( ComboBox, CheckBox, SpinBox, + SplashScreen, FluentIcon, RoundMenu, MessageBox, @@ -103,6 +104,14 @@ class AUTO_MAA(MSFluentWindow): self.config.open_database() + self.setWindowIcon( + QIcon(str(self.config.app_path / "resources/icons/AUTO_MAA.ico")) + ) + self.setWindowTitle("AUTO_MAA") + + self.splashScreen = SplashScreen(self.windowIcon(), self) + self.show() + # 创建主窗口 self.setting = Setting(config=config, notify=notify, crypto=crypto) self.member_manager = MemberManager(config=config, notify=notify, crypto=crypto) @@ -122,11 +131,6 @@ class AUTO_MAA(MSFluentWindow): NavigationItemPosition.TOP, ) - self.setWindowIcon( - QIcon(str(self.config.app_path / "resources/icons/AUTO_MAA.ico")) - ) - self.setWindowTitle("AUTO_MAA") - # 创建系统托盘及其菜单 self.tray = QSystemTrayIcon( QIcon(str(self.config.app_path / "resources/icons/AUTO_MAA.ico")), @@ -168,6 +172,7 @@ class AUTO_MAA(MSFluentWindow): self.tray.setContextMenu(self.tray_menu) self.tray.activated.connect(self.on_tray_activated) + self.splashScreen.finish() self.show_main() def show_tray(self): @@ -274,10 +279,8 @@ class AUTO_MAA(MSFluentWindow): ) self.setGeometry(location[0], location[1], size[0], size[1]) if self.config.global_config.get(self.config.global_config.ui_maximized): - self.showMinimized() self.showMaximized() else: - self.showMinimized() self.showNormal() self.if_save = True