From 418c3d4742531a52f072a61e5236fd25e69899fe Mon Sep 17 00:00:00 2001 From: DLmaster361 Date: Sun, 4 May 2025 11:12:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E4=BF=AE=E5=A4=8D=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=88=B0=E6=89=98=E7=9B=98=E6=97=B6=EF=BC=8C=E6=89=98=E7=9B=98?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E9=80=80=E5=87=BA=E4=B8=BB=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ui/main_window.py | 6 +++++- app/ui/setting.py | 5 +---- resources/version.json | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/ui/main_window.py b/app/ui/main_window.py index 0b9b599..9baa317 100644 --- a/app/ui/main_window.py +++ b/app/ui/main_window.py @@ -181,7 +181,11 @@ class AUTO_MAA(MSFluentWindow): # 退出主程序菜单项 self.tray_menu.addAction( - Action(FluentIcon.POWER_BUTTON, "退出主程序", triggered=self.window().close) + Action( + FluentIcon.POWER_BUTTON, + "退出主程序", + triggered=lambda: (self.window().close(), QApplication.quit()), + ) ) # 设置托盘菜单 diff --git a/app/ui/setting.py b/app/ui/setting.py index d07bfa4..1f3fd62 100644 --- a/app/ui/setting.py +++ b/app/ui/setting.py @@ -177,10 +177,7 @@ class Setting(QWidget): while True: choice = LineEditMessageBox( - self.window(), - "未检测到管理密钥,请设置您的管理密钥", - "管理密钥", - "密码", + self.window(), "请设置您的管理密钥", "管理密钥", "密码" ) if choice.exec() and choice.input.text() != "": Crypto.get_PASSWORD(choice.input.text()) diff --git a/resources/version.json b/resources/version.json index a074111..6bf962d 100644 --- a/resources/version.json +++ b/resources/version.json @@ -7,7 +7,8 @@ "修复BUG": [ "修复软件窗口最大化异常问题", "修复异常操作导致窗口离开屏幕后难以复原的问题", - "修正剩余理智关卡文案" + "修正剩余理智关卡文案", + "修复隐藏到托盘时,托盘无法退出主程序的问题" ], "程序优化": [ "主窗口显示版本号"