Просмотр исходного кода

Unify Premium Plans feature list spacing

- Introduce FeatureListMetrics for shared 10pt row and icon-label gaps
- Match feature stack top/bottom insets (21pt); keep left inset at 37pt

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 недель назад: 3
Родитель
Сommit
7687750989
1 измененных файлов с 8 добавлено и 3 удалено
  1. 8 3
      App for Indeed/Controllers/PremiumPlansWindowController.swift

+ 8 - 3
App for Indeed/Controllers/PremiumPlansWindowController.swift

@@ -124,6 +124,11 @@ private final class PremiumPlansViewController: NSViewController {
124
         static let iconTint = NSColor(srgbRed: 47 / 255, green: 136 / 255, blue: 255 / 255, alpha: 1)
124
         static let iconTint = NSColor(srgbRed: 47 / 255, green: 136 / 255, blue: 255 / 255, alpha: 1)
125
     }
125
     }
126
 
126
 
127
+    private enum FeatureListMetrics {
128
+        static let spacing = CGFloat(10)
129
+        static let edgeInsets = NSEdgeInsets(top: 21, left: 37, bottom: 21, right: 0)
130
+    }
131
+
127
     private let plans: [Plan] = [
132
     private let plans: [Plan] = [
128
         Plan(
133
         Plan(
129
             id: "weekly",
134
             id: "weekly",
@@ -335,9 +340,9 @@ private final class PremiumPlansViewController: NSViewController {
335
 
340
 
336
         let featuresStack = NSStackView(views: plan.features.map(makeFeatureRow(_:)))
341
         let featuresStack = NSStackView(views: plan.features.map(makeFeatureRow(_:)))
337
         featuresStack.orientation = .vertical
342
         featuresStack.orientation = .vertical
338
-        featuresStack.spacing = 9
343
+        featuresStack.spacing = FeatureListMetrics.spacing
339
         featuresStack.alignment = .leading
344
         featuresStack.alignment = .leading
340
-        featuresStack.edgeInsets = NSEdgeInsets(top: 20, left: 22, bottom: 0, right: 0)
345
+        featuresStack.edgeInsets = FeatureListMetrics.edgeInsets
341
 
346
 
342
         let selectButton = NSButton(title: "Get \(plan.title)", target: self, action: #selector(didTapSelectPlan))
347
         let selectButton = NSButton(title: "Get \(plan.title)", target: self, action: #selector(didTapSelectPlan))
343
         selectButton.identifier = NSUserInterfaceItemIdentifier(plan.id)
348
         selectButton.identifier = NSUserInterfaceItemIdentifier(plan.id)
@@ -407,7 +412,7 @@ private final class PremiumPlansViewController: NSViewController {
407
 
412
 
408
         let row = NSStackView(views: [icon, label])
413
         let row = NSStackView(views: [icon, label])
409
         row.orientation = .horizontal
414
         row.orientation = .horizontal
410
-        row.spacing = 8
415
+        row.spacing = FeatureListMetrics.spacing
411
         row.alignment = .centerY
416
         row.alignment = .centerY
412
         row.distribution = .fill
417
         row.distribution = .fill
413
         return row
418
         return row