修复 macOS 标题栏布局
(self)
| 316 | self.fixMacOSTitleBar() |
| 317 | |
| 318 | def fixMacOSTitleBar(self): |
| 319 | """修复 macOS 标题栏布局""" |
| 320 | if system().lower() != "darwin": |
| 321 | return |
| 322 | |
| 323 | leftColumn = QWidget() |
| 324 | leftColumn.setFixedWidth(35) |
| 325 | leftColumn.setStyleSheet("background-color: transparent;") |
| 326 | self.titleBar.hBoxLayout.insertWidget(0, leftColumn, 0) |
| 327 | self.macOSLeftColumn = leftColumn # 保存引用 |
| 328 | |
| 329 | topRow = QWidget() |
| 330 | topRow.setFixedHeight(38) |
| 331 | topRow.setStyleSheet("background-color: transparent;") |
| 332 | self.navigationInterface.panel.vBoxLayout.insertWidget(0, topRow, 0) |
| 333 | self.macOSTopRow = topRow # 保存引用 |
| 334 | |
| 335 | def changeEvent(self, event: QEvent): |
| 336 | """监听窗口状态变化""" |