初始化窗口
(self)
| 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 标题栏布局""" |
no test coverage detected