Forráskód Böngészése

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 2 hónapja
szülő
commit
b29d0eb14e
1 módosított fájl, 7 hozzáadás és 0 törlés
  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 {
         familyChipsRow.orientation = .horizontal
         familyChipsRow.spacing = 8
         familyChipsRow.alignment = .centerY
+        familyChipsRow.distribution = .fill
         familyChipsRow.translatesAutoresizingMaskIntoConstraints = false
 
         gridStack.orientation = .vertical
@@ -733,6 +734,12 @@ final class CVMakerPageView: NSView {
             familyChipButtons[family] = chip
         }
 
+        let familyRowTailSpacer = NSView()
+        familyRowTailSpacer.translatesAutoresizingMaskIntoConstraints = false
+        familyRowTailSpacer.setContentHuggingPriority(.init(1), for: .horizontal)
+        familyRowTailSpacer.setContentCompressionResistancePriority(.init(1), for: .horizontal)
+        familyChipsRow.addArrangedSubview(familyRowTailSpacer)
+
         if let f = selectedFamily, templates(forGroup: selectedGroup, family: f).isEmpty {
             selectedFamily = nil
         }