feat(core): 添加启动时直接最小化功能

This commit is contained in:
DLmaster
2025-02-21 16:15:55 +08:00
parent 1367daf1b7
commit c19068128f
5 changed files with 17 additions and 2 deletions

View File

@@ -82,7 +82,7 @@ MAA多账号管理与自动化软件
![Alt](https://repobeats.axiom.co/api/embed/6c2f834141eff1ac297db70d12bd11c6236a58a5.svg "Repobeats analytics image") ![Alt](https://repobeats.axiom.co/api/embed/6c2f834141eff1ac297db70d12bd11c6236a58a5.svg "Repobeats analytics image")
感谢 @ClozyA 为本项目提供的下载服务器 感谢 [AoXuan (@ClozyA)](https://github.com/ClozyA) 为本项目提供的下载服务器
## Star History ## Star History

View File

@@ -759,6 +759,9 @@ class GlobalConfig(QConfig):
start_IfSelfStart = ConfigItem("Start", "IfSelfStart", False, BoolValidator()) start_IfSelfStart = ConfigItem("Start", "IfSelfStart", False, BoolValidator())
start_IfRunDirectly = ConfigItem("Start", "IfRunDirectly", False, BoolValidator()) start_IfRunDirectly = ConfigItem("Start", "IfRunDirectly", False, BoolValidator())
start_IfMinimizeDirectly = ConfigItem(
"Start", "IfMinimizeDirectly", False, BoolValidator()
)
ui_IfShowTray = ConfigItem("UI", "IfShowTray", False, BoolValidator()) ui_IfShowTray = ConfigItem("UI", "IfShowTray", False, BoolValidator())
ui_IfToTray = ConfigItem("UI", "IfToTray", False, BoolValidator()) ui_IfToTray = ConfigItem("UI", "IfToTray", False, BoolValidator())

View File

@@ -255,6 +255,11 @@ class AUTO_MAA(MSFluentWindow):
self.start_main_task() self.start_main_task()
# 直接最小化
if Config.global_config.get(Config.global_config.start_IfMinimizeDirectly):
self.titleBar.minBtn.click()
def set_min_method(self) -> None: def set_min_method(self) -> None:
"""设置最小化方法""" """设置最小化方法"""

View File

@@ -493,10 +493,17 @@ class StartSettingCard(HeaderCardWidget):
content="启动AUTO_MAA后自动运行自动代理任务优先级调度队列 1 > 脚本 1", content="启动AUTO_MAA后自动运行自动代理任务优先级调度队列 1 > 脚本 1",
configItem=Config.global_config.start_IfRunDirectly, configItem=Config.global_config.start_IfRunDirectly,
) )
self.card_IfMinimizeDirectly = SwitchSettingCard(
icon=FluentIcon.PAGE_RIGHT,
title="启动后直接最小化",
content="启动AUTO_MAA后直接最小化",
configItem=Config.global_config.start_IfMinimizeDirectly,
)
Layout = QVBoxLayout() Layout = QVBoxLayout()
Layout.addWidget(self.card_IfSelfStart) Layout.addWidget(self.card_IfSelfStart)
Layout.addWidget(self.card_IfRunDirectly) Layout.addWidget(self.card_IfRunDirectly)
Layout.addWidget(self.card_IfMinimizeDirectly)
self.viewLayout.addLayout(Layout) self.viewLayout.addLayout(Layout)

View File

@@ -1,7 +1,7 @@
{ {
"main_version": "4.2.4.3", "main_version": "4.2.4.3",
"updater_version": "1.1.2.0", "updater_version": "1.1.2.0",
"announcement": "\n## 新增功能\n- 历史记录统计功能上线\n- 添加软件主页\n## 修复BUG\n- 更新器修正`channel`\n## 程序优化\n- 添加MAA监测字段`未检测到任何模拟器`\n- 取消MAA运行中自动更新", "announcement": "\n## 新增功能\n- 历史记录统计功能上线\n- 添加软件主页\n- 添加启动时直接最小化功能\n## 修复BUG\n- 更新器修正`channel`\n## 程序优化\n- 添加MAA监测字段`未检测到任何模拟器`\n- 取消MAA运行中自动更新",
"proxy_list": [ "proxy_list": [
"", "",
"https://gitproxy.click/", "https://gitproxy.click/",