فهرست منبع

Add Indeed wordmark to splash screen and sidebar header.

Introduce a reusable logo view so launch and navigation surfaces show consistent Indeed branding.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 2 ماه پیش
والد
کامیت
68a5042bf7
3فایلهای تغییر یافته به همراه104 افزوده شده و 14 حذف شده
  1. 12 3
      App for Indeed/Views/DashboardView.swift
  2. 83 0
      App for Indeed/Views/IndeedLogoView.swift
  3. 9 11
      App for Indeed/Views/LoadingView.swift

+ 12 - 3
App for Indeed/Views/DashboardView.swift

@@ -2369,14 +2369,23 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
             $0.removeFromSuperview()
         }
 
+        let logo = IndeedLogoView(displayHeight: 26)
+        logo.translatesAutoresizingMaskIntoConstraints = false
+
         let brand = NSTextField(labelWithString: AppMarketingLinks.appDisplayName)
-        brand.font = .systemFont(ofSize: 18, weight: .bold)
+        brand.font = .systemFont(ofSize: 15, weight: .semibold)
         brand.textColor = Theme.brandBlue
         brand.alignment = .left
         brand.maximumNumberOfLines = 2
         brand.preferredMaxLayoutWidth = 194
-        sidebar.addArrangedSubview(brand)
-        sidebar.setCustomSpacing(22, after: brand)
+
+        let brandHeader = NSStackView(views: [logo, brand])
+        brandHeader.orientation = .vertical
+        brandHeader.alignment = .leading
+        brandHeader.spacing = 6
+        brandHeader.translatesAutoresizingMaskIntoConstraints = false
+        sidebar.addArrangedSubview(brandHeader)
+        sidebar.setCustomSpacing(22, after: brandHeader)
 
         items.enumerated().forEach { index, item in
             let isSelected = index == selectedSidebarIndex

+ 83 - 0
App for Indeed/Views/IndeedLogoView.swift

@@ -0,0 +1,83 @@
+//
+//  IndeedLogoView.swift
+//  App for Indeed
+//
+
+import Cocoa
+
+/// Indeed wordmark (`indeed` in brand blue) for splash and branding surfaces.
+enum IndeedBrandLogo {
+    static let brandBlue = NSColor(srgbRed: 37 / 255, green: 87 / 255, blue: 167 / 255, alpha: 1)
+
+    static func wordmarkImage(fittingHeight height: CGFloat) -> NSImage {
+        let fontSize = height * 0.92
+        let font = NSFont.systemFont(ofSize: fontSize, weight: .heavy)
+        let text = "indeed" as NSString
+        let attributes: [NSAttributedString.Key: Any] = [
+            .font: font,
+            .foregroundColor: brandBlue,
+            .kern: -0.6
+        ]
+        let size = text.size(withAttributes: attributes)
+        let canvas = NSSize(width: ceil(size.width) + 4, height: ceil(size.height) + 4)
+        let image = NSImage(size: canvas)
+        image.lockFocus()
+        defer { image.unlockFocus() }
+        NSColor.clear.set()
+        NSRect(origin: .zero, size: canvas).fill()
+        let origin = NSPoint(x: 2, y: (canvas.height - size.height) / 2)
+        text.draw(at: origin, withAttributes: attributes)
+        return image
+    }
+}
+
+final class IndeedLogoView: NSView {
+    private let imageView = NSImageView()
+    private var displayHeight: CGFloat = 44
+
+    override var intrinsicContentSize: NSSize {
+        guard let image = imageView.image, image.size.height > 0 else {
+            return NSSize(width: 140, height: displayHeight)
+        }
+        let aspect = image.size.width / image.size.height
+        return NSSize(width: displayHeight * aspect, height: displayHeight)
+    }
+
+    init(displayHeight: CGFloat = 44) {
+        self.displayHeight = displayHeight
+        super.init(frame: .zero)
+        setUp()
+    }
+
+    @available(*, unavailable)
+    required init?(coder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+
+    func setDisplayHeight(_ height: CGFloat) {
+        displayHeight = height
+        refreshImage()
+        invalidateIntrinsicContentSize()
+    }
+
+    private func setUp() {
+        translatesAutoresizingMaskIntoConstraints = false
+        imageView.translatesAutoresizingMaskIntoConstraints = false
+        imageView.imageScaling = .scaleProportionallyUpOrDown
+        addSubview(imageView)
+        NSLayoutConstraint.activate([
+            imageView.leadingAnchor.constraint(equalTo: leadingAnchor),
+            imageView.trailingAnchor.constraint(equalTo: trailingAnchor),
+            imageView.topAnchor.constraint(equalTo: topAnchor),
+            imageView.bottomAnchor.constraint(equalTo: bottomAnchor)
+        ])
+        refreshImage()
+        setAccessibilityElement(true)
+        setAccessibilityRole(.image)
+        setAccessibilityLabel("Indeed")
+    }
+
+    private func refreshImage() {
+        imageView.image = IndeedBrandLogo.wordmarkImage(fittingHeight: displayHeight)
+    }
+}

+ 9 - 11
App for Indeed/Views/LoadingView.swift

@@ -24,7 +24,7 @@ final class LoadingView: NSView {
     private let backgroundGradientHost = NSView()
     private let heroBackground = LoadingSplashBackgroundView()
     private let iconWell = NSView()
-    private let iconView = NSImageView()
+    private let logoView = IndeedLogoView(displayHeight: 44)
     private let aiBadgeHost = NSView()
     private let aiBadgeLabel = NSTextField(labelWithString: "AI-POWERED")
     private let titleLabel = NSTextField(labelWithString: AppMarketingLinks.displayName)
@@ -105,9 +105,7 @@ final class LoadingView: NSView {
         iconWell.layer?.shadowRadius = 16
         iconWell.layer?.shadowOffset = CGSize(width: 0, height: -4)
 
-        iconView.translatesAutoresizingMaskIntoConstraints = false
-        iconView.imageScaling = .scaleProportionallyUpOrDown
-        iconView.image = NSApp.applicationIconImage
+        logoView.translatesAutoresizingMaskIntoConstraints = false
 
         aiBadgeHost.translatesAutoresizingMaskIntoConstraints = false
         aiBadgeHost.wantsLayer = true
@@ -149,7 +147,7 @@ final class LoadingView: NSView {
 
         thinkingIndicator.translatesAutoresizingMaskIntoConstraints = false
 
-        iconWell.addSubview(iconView)
+        iconWell.addSubview(logoView)
         aiBadgeHost.addSubview(aiBadgeLabel)
 
         let heroStack = NSStackView(views: [
@@ -187,13 +185,13 @@ final class LoadingView: NSView {
             heroBackground.topAnchor.constraint(equalTo: topAnchor),
             heroBackground.bottomAnchor.constraint(equalTo: bottomAnchor),
 
-            iconWell.widthAnchor.constraint(equalToConstant: 128),
-            iconWell.heightAnchor.constraint(equalToConstant: 128),
+            iconWell.widthAnchor.constraint(greaterThanOrEqualToConstant: 200),
+            iconWell.heightAnchor.constraint(equalToConstant: 96),
 
-            iconView.centerXAnchor.constraint(equalTo: iconWell.centerXAnchor),
-            iconView.centerYAnchor.constraint(equalTo: iconWell.centerYAnchor),
-            iconView.widthAnchor.constraint(equalToConstant: 88),
-            iconView.heightAnchor.constraint(equalToConstant: 88),
+            logoView.centerXAnchor.constraint(equalTo: iconWell.centerXAnchor),
+            logoView.centerYAnchor.constraint(equalTo: iconWell.centerYAnchor),
+            logoView.leadingAnchor.constraint(greaterThanOrEqualTo: iconWell.leadingAnchor, constant: 24),
+            logoView.trailingAnchor.constraint(lessThanOrEqualTo: iconWell.trailingAnchor, constant: -24),
 
             aiBadgeHost.heightAnchor.constraint(equalToConstant: 26),
             aiBadgeLabel.leadingAnchor.constraint(equalTo: aiBadgeHost.leadingAnchor, constant: 14),