소스 검색

Make dashboard chrome fill the window edge to edge.

Pin chromeContainer to documentContainer without horizontal or vertical
insets, remove the max width cap, zero outer corner radius, and adjust
document height calculation now that outer margins are gone.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 2 달 전
부모
커밋
6a7062e6a7
1개의 변경된 파일6개의 추가작업 그리고 7개의 파일을 삭제
  1. 6 7
      App for Indeed/Views/DashboardView.swift

+ 6 - 7
App for Indeed/Views/DashboardView.swift

@@ -84,7 +84,7 @@ final class DashboardView: NSView {
         chromeContainer.translatesAutoresizingMaskIntoConstraints = false
         chromeContainer.wantsLayer = true
         chromeContainer.layer?.backgroundColor = Theme.chromeBackground.cgColor
-        chromeContainer.layer?.cornerRadius = 18
+        chromeContainer.layer?.cornerRadius = 0
         documentContainer.addSubview(chromeContainer)
         chromeContainer.addSubview(contentStack)
         scrollView.documentView = documentContainer
@@ -163,11 +163,10 @@ final class DashboardView: NSView {
             scrollView.topAnchor.constraint(equalTo: topAnchor),
             scrollView.bottomAnchor.constraint(equalTo: bottomAnchor),
 
-            chromeContainer.topAnchor.constraint(equalTo: documentContainer.topAnchor, constant: 18),
-            chromeContainer.bottomAnchor.constraint(equalTo: documentContainer.bottomAnchor, constant: -18),
-            chromeContainer.centerXAnchor.constraint(equalTo: documentContainer.centerXAnchor),
-            chromeContainer.widthAnchor.constraint(lessThanOrEqualToConstant: 1240),
-            chromeContainer.widthAnchor.constraint(equalTo: documentContainer.widthAnchor, constant: -36),
+            chromeContainer.leadingAnchor.constraint(equalTo: documentContainer.leadingAnchor),
+            chromeContainer.trailingAnchor.constraint(equalTo: documentContainer.trailingAnchor),
+            chromeContainer.topAnchor.constraint(equalTo: documentContainer.topAnchor),
+            chromeContainer.bottomAnchor.constraint(equalTo: documentContainer.bottomAnchor),
 
             contentStack.leadingAnchor.constraint(equalTo: chromeContainer.leadingAnchor),
             contentStack.trailingAnchor.constraint(equalTo: chromeContainer.trailingAnchor),
@@ -333,7 +332,7 @@ final class DashboardView: NSView {
 
     private func updateDocumentLayout() {
         documentContainer.layoutSubtreeIfNeeded()
-        let fittingHeight = max(chromeContainer.fittingSize.height + 36, bounds.height)
+        let fittingHeight = max(chromeContainer.fittingSize.height, bounds.height)
         documentContainer.frame = NSRect(x: 0, y: 0, width: bounds.width, height: fittingHeight)
     }
 }