fix(ui): 修复窗口最大化功能异常
This commit is contained in:
@@ -379,14 +379,18 @@ class AUTO_MAA(MSFluentWindow):
|
|||||||
self.window().setGeometry(location[0], location[1], size[0], size[1])
|
self.window().setGeometry(location[0], location[1], size[0], size[1])
|
||||||
self.window().show()
|
self.window().show()
|
||||||
if not if_quick:
|
if not if_quick:
|
||||||
if Config.get(Config.ui_maximized):
|
if (
|
||||||
self.window().showMaximized()
|
Config.get(Config.ui_maximized)
|
||||||
|
and not self.window().isMaximized()
|
||||||
|
):
|
||||||
|
self.titleBar.maxBtn.click()
|
||||||
self.show_ui("配置托盘")
|
self.show_ui("配置托盘")
|
||||||
elif if_start:
|
elif if_start:
|
||||||
if Config.get(Config.ui_maximized):
|
if Config.get(Config.ui_maximized) and not self.window().isMaximized():
|
||||||
self.window().showMaximized()
|
self.titleBar.maxBtn.click()
|
||||||
self.show_ui("配置托盘")
|
self.show_ui("配置托盘")
|
||||||
|
|
||||||
|
# 如果窗口不在屏幕内,则重置窗口位置
|
||||||
if not any(
|
if not any(
|
||||||
self.window().geometry().intersects(screen.availableGeometry())
|
self.window().geometry().intersects(screen.availableGeometry())
|
||||||
for screen in QApplication.screens()
|
for screen in QApplication.screens()
|
||||||
|
|||||||
Reference in New Issue
Block a user