mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-22 11:30:13 +08:00
fix(macos): 🐛 restore opaque window background for title bar (#2448)
Keep the first-frame-ready show flow from #1287, but stop clearing the native window background so the macOS title bar no longer appears transparent. Co-authored-by: Wine Fox <fox@ling.plus>
This commit is contained in:
@@ -9,9 +9,9 @@ class MainFlutterWindow: NSWindow {
|
||||
self.contentViewController = flutterViewController
|
||||
self.setFrame(self.frame, display: true)
|
||||
|
||||
// 背景别用默认黑色
|
||||
self.isOpaque = false
|
||||
self.backgroundColor = .clear
|
||||
// 使用系统窗口背景色,避免启动防闪时把标题栏/窗口背景透成透明
|
||||
self.isOpaque = true
|
||||
self.backgroundColor = .windowBackgroundColor
|
||||
|
||||
RegisterGeneratedPlugins(registry: flutterViewController)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user