fix(ui): 修复隐藏到托盘时,托盘无法退出主程序的问题

This commit is contained in:
DLmaster361
2025-05-04 11:12:34 +08:00
parent 17ec962a22
commit 418c3d4742
3 changed files with 8 additions and 6 deletions

View File

@@ -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()),
)
)
# 设置托盘菜单

View File

@@ -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())