MCPcopy Index your code
hub / github.com/MCSLTeam/MCSL2 / initWindow

Method initWindow

MCSL2Lib/windowInterface.py:299–316  ·  view source on GitHub ↗

初始化窗口

(self)

Source from the content-addressed store, hash-verified

297 self.navigationInterface.setCurrentItem(self.homeInterface.objectName())
298
299 def initWindow(self):
300 """初始化窗口"""
301
302 self.setWindowIcon(QIcon(":/built-InIcons/MCSL2.png"))
303
304 # create splash screen
305 self.splashScreen = SplashScreen(self.windowIcon(), self)
306 self.splashScreen.setIconSize(QSize(106, 106))
307 self.splashScreen.raise_()
308
309 desktop = QApplication.desktop().availableGeometry()
310 w, h = desktop.width(), desktop.height()
311 self.setMinimumSize(QSize(750, 520))
312 self.resize(int(w // 1.5), int(h // 1.5))
313 self.move(w // 2 - self.width() // 2, h // 2 - self.height() // 2)
314 self.show()
315 QApplication.processEvents()
316 self.fixMacOSTitleBar()
317
318 def fixMacOSTitleBar(self):
319 """修复 macOS 标题栏布局"""

Callers 1

__init__Method · 0.95

Calls 1

fixMacOSTitleBarMethod · 0.95

Tested by

no test coverage detected