소스 검색

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 2 달 전
부모
커밋
32c0ac60f8
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  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 {
         brand.font = .systemFont(ofSize: 18, weight: .bold)
         brand.textColor = Theme.brandBlue
         brand.alignment = .left
+        brand.maximumNumberOfLines = 2
+        // Tight multiline height in the sidebar stack (zero width makes intrinsic height unreliable).
+        brand.preferredMaxLayoutWidth = 194
         sidebar.addArrangedSubview(brand)
-
-        let titleToMenuSpacer = NSView()
-        titleToMenuSpacer.translatesAutoresizingMaskIntoConstraints = false
-        titleToMenuSpacer.heightAnchor.constraint(equalToConstant: 24).isActive = true
-        sidebar.addArrangedSubview(titleToMenuSpacer)
+        sidebar.setCustomSpacing(10, after: brand)
 
         items.enumerated().forEach { index, item in
             let isSelected = index == selectedSidebarIndex