Преглед на файлове

Make sidebar nav selection span full sidebar width

Pin each SidebarNavRowView width to the sidebar minus horizontal
edge insets and lower horizontal content hugging so the active
row highlight fills the usable bar instead of hugging icon+label.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 преди 2 месеца
родител
ревизия
a4aa901e93
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      App for Indeed/Views/DashboardView.swift

+ 3 - 0
App for Indeed/Views/DashboardView.swift

@@ -320,7 +320,10 @@ final class DashboardView: NSView {
                 row.topAnchor.constraint(equalTo: rowHost.topAnchor, constant: 8),
                 row.bottomAnchor.constraint(equalTo: rowHost.bottomAnchor, constant: -8)
             ])
+            rowHost.setContentHuggingPriority(.defaultLow, for: .horizontal)
             sidebar.addArrangedSubview(rowHost)
+            let sidebarHorizontalInset = sidebar.edgeInsets.left + sidebar.edgeInsets.right
+            rowHost.widthAnchor.constraint(equalTo: sidebar.widthAnchor, constant: -sidebarHorizontalInset).isActive = true
         }
 
         let sidebarBottomSpacer = NSView()