Просмотр исходного кода

Eliminate residual left-edge spacing in the home shell.

Make the chrome column conform to the shell corner radius and pin the shell flush to its container so sidebar corners render cleanly without visual gaps.

Made-with: Cursor
huzaifahayat12 6 месяцев назад
Родитель
Сommit
73b9260a4c
1 измененных файлов с 7 добавлено и 4 удалено
  1. 7 4
      zoom_app/ViewController.swift

+ 7 - 4
zoom_app/ViewController.swift

@@ -669,6 +669,9 @@ class ViewController: NSViewController {
         let chromeColumn = NSView()
         let chromeColumn = NSView()
         chromeColumn.wantsLayer = true
         chromeColumn.wantsLayer = true
         chromeColumn.layer?.backgroundColor = chromeUnifiedBackground.cgColor
         chromeColumn.layer?.backgroundColor = chromeUnifiedBackground.cgColor
+        chromeColumn.layer?.cornerRadius = appShellCornerRadius
+        chromeColumn.layer?.maskedCorners = [.layerMinXMinYCorner, .layerMinXMaxYCorner]
+        chromeColumn.layer?.masksToBounds = true
         let chromeDivider = NSView()
         let chromeDivider = NSView()
         chromeDivider.wantsLayer = true
         chromeDivider.wantsLayer = true
         chromeDivider.layer?.backgroundColor = NSColor.black.withAlphaComponent(0.32).cgColor
         chromeDivider.layer?.backgroundColor = NSColor.black.withAlphaComponent(0.32).cgColor
@@ -694,10 +697,10 @@ class ViewController: NSViewController {
         content.translatesAutoresizingMaskIntoConstraints = false
         content.translatesAutoresizingMaskIntoConstraints = false
 
 
         NSLayoutConstraint.activate([
         NSLayoutConstraint.activate([
-            shell.leadingAnchor.constraint(equalTo: root.leadingAnchor, constant: 4),
-            shell.trailingAnchor.constraint(equalTo: root.trailingAnchor, constant: -4),
+            shell.leadingAnchor.constraint(equalTo: root.leadingAnchor),
+            shell.trailingAnchor.constraint(equalTo: root.trailingAnchor),
             shell.topAnchor.constraint(equalTo: root.topAnchor, constant: 0),
             shell.topAnchor.constraint(equalTo: root.topAnchor, constant: 0),
-            shell.bottomAnchor.constraint(equalTo: root.bottomAnchor, constant: -4),
+            shell.bottomAnchor.constraint(equalTo: root.bottomAnchor),
             chromeColumn.leadingAnchor.constraint(equalTo: shell.leadingAnchor),
             chromeColumn.leadingAnchor.constraint(equalTo: shell.leadingAnchor),
             chromeColumn.topAnchor.constraint(equalTo: shell.topAnchor),
             chromeColumn.topAnchor.constraint(equalTo: shell.topAnchor),
             chromeColumn.bottomAnchor.constraint(equalTo: shell.bottomAnchor),
             chromeColumn.bottomAnchor.constraint(equalTo: shell.bottomAnchor),
@@ -712,7 +715,7 @@ class ViewController: NSViewController {
             chromeHeader.heightAnchor.constraint(equalToConstant: homeChromeHeaderHeight),
             chromeHeader.heightAnchor.constraint(equalToConstant: homeChromeHeaderHeight),
             sidebar.leadingAnchor.constraint(equalTo: chromeColumn.leadingAnchor),
             sidebar.leadingAnchor.constraint(equalTo: chromeColumn.leadingAnchor),
             sidebar.trailingAnchor.constraint(equalTo: chromeColumn.trailingAnchor),
             sidebar.trailingAnchor.constraint(equalTo: chromeColumn.trailingAnchor),
-            sidebar.topAnchor.constraint(equalTo: chromeHeader.bottomAnchor, constant: 2),
+            sidebar.topAnchor.constraint(equalTo: chromeHeader.bottomAnchor),
             sidebar.bottomAnchor.constraint(equalTo: chromeColumn.bottomAnchor),
             sidebar.bottomAnchor.constraint(equalTo: chromeColumn.bottomAnchor),
             content.leadingAnchor.constraint(equalTo: chromeColumn.trailingAnchor),
             content.leadingAnchor.constraint(equalTo: chromeColumn.trailingAnchor),
             content.trailingAnchor.constraint(equalTo: shell.trailingAnchor),
             content.trailingAnchor.constraint(equalTo: shell.trailingAnchor),