Bladeren bron

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 weken geleden
bovenliggende
commit
b29d0eb14e
1 gewijzigde bestanden met toevoegingen van 7 en 0 verwijderingen
  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 622
         familyChipsRow.orientation = .horizontal
623 623
         familyChipsRow.spacing = 8
624 624
         familyChipsRow.alignment = .centerY
625
+        familyChipsRow.distribution = .fill
625 626
         familyChipsRow.translatesAutoresizingMaskIntoConstraints = false
626 627
 
627 628
         gridStack.orientation = .vertical
@@ -733,6 +734,12 @@ final class CVMakerPageView: NSView {
733 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 743
         if let f = selectedFamily, templates(forGroup: selectedGroup, family: f).isEmpty {
737 744
             selectedFamily = nil
738 745
         }