Procházet zdrojové kódy

Tighten sidebar spacing between brand title and nav rows

Remove the fixed title-to-menu spacer and use stack custom spacing
instead. Cap the brand label to two lines with a preferred max width so
multiline NSTextField does not inflate vertical space.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 před 3 týdny
rodič
revize
32c0ac60f8
1 změnil soubory, kde provedl 4 přidání a 5 odebrání
  1. 4 5
      App for Indeed/Views/DashboardView.swift

+ 4 - 5
App for Indeed/Views/DashboardView.swift

@@ -1190,12 +1190,11 @@ final class DashboardView: NSView, NSTextFieldDelegate {
1190 1190
         brand.font = .systemFont(ofSize: 18, weight: .bold)
1191 1191
         brand.textColor = Theme.brandBlue
1192 1192
         brand.alignment = .left
1193
+        brand.maximumNumberOfLines = 2
1194
+        // Tight multiline height in the sidebar stack (zero width makes intrinsic height unreliable).
1195
+        brand.preferredMaxLayoutWidth = 194
1193 1196
         sidebar.addArrangedSubview(brand)
1194
-
1195
-        let titleToMenuSpacer = NSView()
1196
-        titleToMenuSpacer.translatesAutoresizingMaskIntoConstraints = false
1197
-        titleToMenuSpacer.heightAnchor.constraint(equalToConstant: 24).isActive = true
1198
-        sidebar.addArrangedSubview(titleToMenuSpacer)
1197
+        sidebar.setCustomSpacing(10, after: brand)
1199 1198
 
1200 1199
         items.enumerated().forEach { index, item in
1201 1200
             let isSelected = index == selectedSidebarIndex