Bladeren bron

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 4 dagen geleden
bovenliggende
commit
7cc8592434
1 gewijzigde bestanden met toevoegingen van 16 en 1 verwijderingen
  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
428
         findJobsCTAPill.layer?.backgroundColor = (ctaHovering ? Theme.brandBlueHover : Theme.brandBlue).cgColor
428
         findJobsCTAPill.layer?.backgroundColor = (ctaHovering ? Theme.brandBlueHover : Theme.brandBlue).cgColor
429
         sendIconView.contentTintColor = Theme.proCTAText
429
         sendIconView.contentTintColor = Theme.proCTAText
430
         sendLabel.textColor = Theme.proCTAText
430
         sendLabel.textColor = Theme.proCTAText
431
+        clearChatButton.layer?.backgroundColor = Theme.brandBlue.cgColor
432
+        clearChatButton.contentTintColor = Theme.proCTAText
431
         freeJobSearchQuotaLabel.textColor = Theme.secondaryText
433
         freeJobSearchQuotaLabel.textColor = Theme.secondaryText
432
 
434
 
433
         appearanceModeSegment?.selectedSegment = AppAppearanceManager.shared.mode.segmentIndex
435
         appearanceModeSegment?.selectedSegment = AppAppearanceManager.shared.mode.segmentIndex
@@ -636,11 +638,24 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
636
         chatHeaderLeadingSpacer.setContentHuggingPriority(.defaultLow, for: .horizontal)
638
         chatHeaderLeadingSpacer.setContentHuggingPriority(.defaultLow, for: .horizontal)
637
         clearChatButton.translatesAutoresizingMaskIntoConstraints = false
639
         clearChatButton.translatesAutoresizingMaskIntoConstraints = false
638
         clearChatButton.bezelStyle = .rounded
640
         clearChatButton.bezelStyle = .rounded
639
-        clearChatButton.font = .systemFont(ofSize: 12, weight: .medium)
641
+        clearChatButton.controlSize = .regular
642
+        clearChatButton.font = .systemFont(ofSize: 13, weight: .medium)
643
+        clearChatButton.isBordered = false
644
+        clearChatButton.wantsLayer = true
645
+        clearChatButton.layer?.cornerRadius = 8
646
+        clearChatButton.layer?.backgroundColor = Theme.brandBlue.cgColor
647
+        clearChatButton.contentTintColor = Theme.proCTAText
648
+        clearChatButton.focusRingType = .none
640
         clearChatButton.target = self
649
         clearChatButton.target = self
641
         clearChatButton.action = #selector(didTapClearChat)
650
         clearChatButton.action = #selector(didTapClearChat)
642
         clearChatButton.toolTip = L("Remove all messages and start a new conversation")
651
         clearChatButton.toolTip = L("Remove all messages and start a new conversation")
643
         clearChatButton.setContentHuggingPriority(.required, for: .horizontal)
652
         clearChatButton.setContentHuggingPriority(.required, for: .horizontal)
653
+        let clearChatHorizontalPad: CGFloat = 12
654
+        let clearChatMinWidth = clearChatButton.intrinsicContentSize.width + clearChatHorizontalPad * 2
655
+        NSLayoutConstraint.activate([
656
+            clearChatButton.heightAnchor.constraint(equalToConstant: 30),
657
+            clearChatButton.widthAnchor.constraint(greaterThanOrEqualToConstant: clearChatMinWidth)
658
+        ])
644
         chatHeaderRow.addArrangedSubview(chatHeaderLeadingSpacer)
659
         chatHeaderRow.addArrangedSubview(chatHeaderLeadingSpacer)
645
         chatHeaderRow.addArrangedSubview(clearChatButton)
660
         chatHeaderRow.addArrangedSubview(clearChatButton)
646
         mainOverlay.addArrangedSubview(chatHeaderRow)
661
         mainOverlay.addArrangedSubview(chatHeaderRow)