Sfoglia il codice sorgente

Style Clear chat button with brand blue to match Send.

Keep the rounded control shape, refresh colors on appearance changes, and slightly increase size for readability.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 1 mese fa
parent
commit
7cc8592434
1 ha cambiato i file con 16 aggiunte e 1 eliminazioni
  1. 16 1
      App for Indeed/Views/DashboardView.swift

+ 16 - 1
App for Indeed/Views/DashboardView.swift

@@ -428,6 +428,8 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
         findJobsCTAPill.layer?.backgroundColor = (ctaHovering ? Theme.brandBlueHover : Theme.brandBlue).cgColor
         sendIconView.contentTintColor = Theme.proCTAText
         sendLabel.textColor = Theme.proCTAText
+        clearChatButton.layer?.backgroundColor = Theme.brandBlue.cgColor
+        clearChatButton.contentTintColor = Theme.proCTAText
         freeJobSearchQuotaLabel.textColor = Theme.secondaryText
 
         appearanceModeSegment?.selectedSegment = AppAppearanceManager.shared.mode.segmentIndex
@@ -636,11 +638,24 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
         chatHeaderLeadingSpacer.setContentHuggingPriority(.defaultLow, for: .horizontal)
         clearChatButton.translatesAutoresizingMaskIntoConstraints = false
         clearChatButton.bezelStyle = .rounded
-        clearChatButton.font = .systemFont(ofSize: 12, weight: .medium)
+        clearChatButton.controlSize = .regular
+        clearChatButton.font = .systemFont(ofSize: 13, weight: .medium)
+        clearChatButton.isBordered = false
+        clearChatButton.wantsLayer = true
+        clearChatButton.layer?.cornerRadius = 8
+        clearChatButton.layer?.backgroundColor = Theme.brandBlue.cgColor
+        clearChatButton.contentTintColor = Theme.proCTAText
+        clearChatButton.focusRingType = .none
         clearChatButton.target = self
         clearChatButton.action = #selector(didTapClearChat)
         clearChatButton.toolTip = L("Remove all messages and start a new conversation")
         clearChatButton.setContentHuggingPriority(.required, for: .horizontal)
+        let clearChatHorizontalPad: CGFloat = 12
+        let clearChatMinWidth = clearChatButton.intrinsicContentSize.width + clearChatHorizontalPad * 2
+        NSLayoutConstraint.activate([
+            clearChatButton.heightAnchor.constraint(equalToConstant: 30),
+            clearChatButton.widthAnchor.constraint(greaterThanOrEqualToConstant: clearChatMinWidth)
+        ])
         chatHeaderRow.addArrangedSubview(chatHeaderLeadingSpacer)
         chatHeaderRow.addArrangedSubview(clearChatButton)
         mainOverlay.addArrangedSubview(chatHeaderRow)