Преглед изворни кода

Fix CV template family chips row layout

The family filter row used NSStackView fill distribution without a flexible
trailing view, so extra width stretched chips (especially All) to match the
wide filter chrome. Add a low-priority tail spacer so pills keep intrinsic
width and consistent 8pt spacing.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 пре 3 недеља
родитељ
комит
b29d0eb14e
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      App for Indeed/Views/CVMakerPageView.swift

+ 7 - 0
App for Indeed/Views/CVMakerPageView.swift

@@ -622,6 +622,7 @@ final class CVMakerPageView: NSView {
622
         familyChipsRow.orientation = .horizontal
622
         familyChipsRow.orientation = .horizontal
623
         familyChipsRow.spacing = 8
623
         familyChipsRow.spacing = 8
624
         familyChipsRow.alignment = .centerY
624
         familyChipsRow.alignment = .centerY
625
+        familyChipsRow.distribution = .fill
625
         familyChipsRow.translatesAutoresizingMaskIntoConstraints = false
626
         familyChipsRow.translatesAutoresizingMaskIntoConstraints = false
626
 
627
 
627
         gridStack.orientation = .vertical
628
         gridStack.orientation = .vertical
@@ -733,6 +734,12 @@ final class CVMakerPageView: NSView {
733
             familyChipButtons[family] = chip
734
             familyChipButtons[family] = chip
734
         }
735
         }
735
 
736
 
737
+        let familyRowTailSpacer = NSView()
738
+        familyRowTailSpacer.translatesAutoresizingMaskIntoConstraints = false
739
+        familyRowTailSpacer.setContentHuggingPriority(.init(1), for: .horizontal)
740
+        familyRowTailSpacer.setContentCompressionResistancePriority(.init(1), for: .horizontal)
741
+        familyChipsRow.addArrangedSubview(familyRowTailSpacer)
742
+
736
         if let f = selectedFamily, templates(forGroup: selectedGroup, family: f).isEmpty {
743
         if let f = selectedFamily, templates(forGroup: selectedGroup, family: f).isEmpty {
737
             selectedFamily = nil
744
             selectedFamily = nil
738
         }
745
         }