Переглянути джерело

Fix window corner background bleed.

Paint the window content view background to match the app background so rounded corners don't show light gaps.

Made-with: Cursor
huzaifahayat12 3 місяців тому
батько
коміт
de6d24cbec
1 змінених файлів з 5 додано та 0 видалено
  1. 5 0
      zoom_app/ViewController.swift

+ 5 - 0
zoom_app/ViewController.swift

@@ -384,6 +384,11 @@ class ViewController: NSViewController {
             // Match the outer window background to the app background so rounded shell corners
             // don't reveal a lighter window color in Dark Mode.
             window.backgroundColor = appBackground
+            window.isOpaque = true
+            if let contentView = window.contentView {
+                contentView.wantsLayer = true
+                contentView.layer?.backgroundColor = appBackground.cgColor
+            }
             // Use full-size content view so custom top chrome sits in the titlebar region.
             window.titleVisibility = .hidden
             window.titlebarAppearsTransparent = true