浏览代码

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 2 月之前
父节点
当前提交
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 {
         static let iconTint = NSColor(srgbRed: 47 / 255, green: 136 / 255, blue: 255 / 255, alpha: 1)
     }
 
+    private enum FeatureListMetrics {
+        static let spacing = CGFloat(10)
+        static let edgeInsets = NSEdgeInsets(top: 21, left: 37, bottom: 21, right: 0)
+    }
+
     private let plans: [Plan] = [
         Plan(
             id: "weekly",
@@ -335,9 +340,9 @@ private final class PremiumPlansViewController: NSViewController {
 
         let featuresStack = NSStackView(views: plan.features.map(makeFeatureRow(_:)))
         featuresStack.orientation = .vertical
-        featuresStack.spacing = 9
+        featuresStack.spacing = FeatureListMetrics.spacing
         featuresStack.alignment = .leading
-        featuresStack.edgeInsets = NSEdgeInsets(top: 20, left: 22, bottom: 0, right: 0)
+        featuresStack.edgeInsets = FeatureListMetrics.edgeInsets
 
         let selectButton = NSButton(title: "Get \(plan.title)", target: self, action: #selector(didTapSelectPlan))
         selectButton.identifier = NSUserInterfaceItemIdentifier(plan.id)
@@ -407,7 +412,7 @@ private final class PremiumPlansViewController: NSViewController {
 
         let row = NSStackView(views: [icon, label])
         row.orientation = .horizontal
-        row.spacing = 8
+        row.spacing = FeatureListMetrics.spacing
         row.alignment = .centerY
         row.distribution = .fill
         return row