MCPcopy Create free account
hub / github.com/MCSLTeam/MCSL2 / fixMacOSTitleBar

Method fixMacOSTitleBar

MCSL2Lib/windowInterface.py:318–333  ·  view source on GitHub ↗

修复 macOS 标题栏布局

(self)

Source from the content-addressed store, hash-verified

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 """监听窗口状态变化"""

Callers 1

initWindowMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected