记忆窗口位置
This commit is contained in:
19
AUTO_MAA.py
19
AUTO_MAA.py
@@ -1392,6 +1392,8 @@ class Main(QWidget):
|
|||||||
["SelfSet.IfSelfStart", "False"],
|
["SelfSet.IfSelfStart", "False"],
|
||||||
["SelfSet.IfSleep", "False"],
|
["SelfSet.IfSleep", "False"],
|
||||||
["SelfSet.IfProxyDirectly", "False"],
|
["SelfSet.IfProxyDirectly", "False"],
|
||||||
|
["SelfSet.UIsize", "1200x700"],
|
||||||
|
["SelfSet.UIlocation", "100x100"],
|
||||||
]
|
]
|
||||||
|
|
||||||
# 导入配置文件
|
# 导入配置文件
|
||||||
@@ -2650,9 +2652,26 @@ class AUTO_MAA(QMainWindow):
|
|||||||
self.setWindowIcon(QIcon(f"{self.main.app_path}/gui/ico/AUTO_MAA.ico"))
|
self.setWindowIcon(QIcon(f"{self.main.app_path}/gui/ico/AUTO_MAA.ico"))
|
||||||
self.setWindowTitle("AUTO_MAA")
|
self.setWindowTitle("AUTO_MAA")
|
||||||
|
|
||||||
|
# 设置窗口初始大小与位置
|
||||||
|
size = list(map(int, self.main.config["Default"]["SelfSet.UIsize"].split("x")))
|
||||||
|
location = list(
|
||||||
|
map(int, self.main.config["Default"]["SelfSet.UIlocation"].split("x"))
|
||||||
|
)
|
||||||
|
self.setGeometry(location[0], location[1], size[0], size[1])
|
||||||
|
|
||||||
def closeEvent(self, event):
|
def closeEvent(self, event):
|
||||||
"""清理残余进程"""
|
"""清理残余进程"""
|
||||||
|
|
||||||
|
# 保存窗口最终大小与位置
|
||||||
|
self.main.config["Default"][
|
||||||
|
"SelfSet.UIsize"
|
||||||
|
] = f"{self.geometry().width()}x{self.geometry().height()}"
|
||||||
|
self.main.config["Default"][
|
||||||
|
"SelfSet.UIlocation"
|
||||||
|
] = f"{self.geometry().x()}x{self.geometry().y()}"
|
||||||
|
with open(self.main.config_path, "w", encoding="utf-8") as f:
|
||||||
|
json.dump(self.main.config, f, indent=4)
|
||||||
|
|
||||||
self.main.MainTimer.requestInterruption()
|
self.main.MainTimer.requestInterruption()
|
||||||
self.main.MainTimer.quit()
|
self.main.MainTimer.quit()
|
||||||
self.main.MainTimer.wait()
|
self.main.MainTimer.wait()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"main_version": "4.1.2.0",
|
"main_version": "4.1.2.1",
|
||||||
"main_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.2/AUTO_MAA_v4.1.2.zip",
|
"main_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.2_beta/AUTO_MAA_v4.1.2_beta.zip",
|
||||||
"updater_version": "1.0.4.0",
|
"updater_version": "1.0.4.0",
|
||||||
"updater_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.2/Updater_v1.0.4.zip",
|
"updater_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.2_beta/Updater_v1.0.4.zip",
|
||||||
"announcement": "\n## 新增功能\n- 添加`启动AUTO_MAA后直接代理`功能\n- 添加无限代理天数模式\n- 完成主程序更新后打开AUTO_MAA\n## 修复BUG\n- 通过限制日志长度解决卡日志情况 #8\n- 修复tips链接无法打开问题 #9\n- 修复正常退出窗口显示停止工作问题 #9\n- 修复解压失败时本地版本号异常变动问题\n- 修复无`version.json`时更新器无法更新的问题\n- 修复未设置管理密钥时添加用户报错\n## 程序优化\n- Updater.exe图标更换\n- 更新逻辑优化\n- GUI窗口逻辑优化\n- 添加更多注释"
|
"announcement": "\n## 新增功能\n- 记忆窗口位置\n## 修复BUG\n- 暂无\n## 程序优化\n- 暂无"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user