|
@@ -2756,14 +2756,34 @@ private extension ViewController {
|
|
2756
|
let savedTimeLabel = textLabel("Saved time: \(savedTimeText)", font: typography.fieldLabel, color: palette.textMuted)
|
2756
|
let savedTimeLabel = textLabel("Saved time: \(savedTimeText)", font: typography.fieldLabel, color: palette.textMuted)
|
|
2757
|
savedTimeLabel.alignment = .left
|
2757
|
savedTimeLabel.alignment = .left
|
|
2758
|
|
2758
|
|
|
2759
|
- let notesButton = NSButton(title: "Get notes", target: self, action: #selector(aiCompanionNotesTapped(_:)))
|
|
|
|
|
|
2759
|
+ let notesButton = HoverButton(title: "Get Notes", target: self, action: #selector(aiCompanionNotesTapped(_:)))
|
|
2760
|
notesButton.translatesAutoresizingMaskIntoConstraints = false
|
2760
|
notesButton.translatesAutoresizingMaskIntoConstraints = false
|
|
2761
|
notesButton.isBordered = false
|
2761
|
notesButton.isBordered = false
|
|
2762
|
- notesButton.bezelStyle = .inline
|
|
|
|
|
|
2762
|
+ notesButton.bezelStyle = .regularSquare
|
|
|
|
2763
|
+ notesButton.wantsLayer = true
|
|
|
|
2764
|
+ notesButton.layer?.cornerRadius = 16
|
|
|
|
2765
|
+ notesButton.layer?.masksToBounds = true
|
|
|
|
2766
|
+ notesButton.layer?.borderWidth = 1
|
|
2763
|
notesButton.font = NSFont.systemFont(ofSize: 13, weight: .semibold)
|
2767
|
notesButton.font = NSFont.systemFont(ofSize: 13, weight: .semibold)
|
|
2764
|
notesButton.contentTintColor = palette.primaryBlue
|
2768
|
notesButton.contentTintColor = palette.primaryBlue
|
|
2765
|
- notesButton.alignment = .left
|
|
|
|
2766
|
- notesButton.setButtonType(.momentaryPushIn)
|
|
|
|
|
|
2769
|
+ notesButton.alignment = .center
|
|
|
|
2770
|
+ notesButton.setButtonType(.momentaryChange)
|
|
|
|
2771
|
+ notesButton.focusRingType = .none
|
|
|
|
2772
|
+ notesButton.image = NSImage(systemSymbolName: "note.text", accessibilityDescription: "Get Notes")
|
|
|
|
2773
|
+ notesButton.symbolConfiguration = NSImage.SymbolConfiguration(pointSize: 13, weight: .semibold)
|
|
|
|
2774
|
+ notesButton.imagePosition = .imageLeading
|
|
|
|
2775
|
+ notesButton.imageHugsTitle = true
|
|
|
|
2776
|
+ notesButton.heightAnchor.constraint(equalToConstant: 32).isActive = true
|
|
|
|
2777
|
+ notesButton.widthAnchor.constraint(greaterThanOrEqualToConstant: 112).isActive = true
|
|
|
|
2778
|
+ let notesBaseFill = palette.primaryBlue.withAlphaComponent(darkModeEnabled ? 0.20 : 0.14)
|
|
|
|
2779
|
+ let notesHoverFill = palette.primaryBlue.withAlphaComponent(darkModeEnabled ? 0.30 : 0.22)
|
|
|
|
2780
|
+ let notesBaseBorder = palette.primaryBlue.withAlphaComponent(darkModeEnabled ? 0.65 : 0.52)
|
|
|
|
2781
|
+ let notesHoverBorder = palette.primaryBlue.withAlphaComponent(darkModeEnabled ? 0.90 : 0.72)
|
|
|
|
2782
|
+ notesButton.onHoverChanged = { [weak notesButton] hovering in
|
|
|
|
2783
|
+ notesButton?.layer?.backgroundColor = (hovering ? notesHoverFill : notesBaseFill).cgColor
|
|
|
|
2784
|
+ notesButton?.layer?.borderColor = (hovering ? notesHoverBorder : notesBaseBorder).cgColor
|
|
|
|
2785
|
+ }
|
|
|
|
2786
|
+ notesButton.onHoverChanged?(false)
|
|
2767
|
aiCompanionNotesMeetingIdByView[ObjectIdentifier(notesButton)] = recording.id
|
2787
|
aiCompanionNotesMeetingIdByView[ObjectIdentifier(notesButton)] = recording.id
|
|
2768
|
|
2788
|
|
|
2769
|
let notesStatusLabel = textLabel(aiCompanionNotesStatusText(for: recording), font: typography.fieldLabel, color: palette.textMuted)
|
2789
|
let notesStatusLabel = textLabel(aiCompanionNotesStatusText(for: recording), font: typography.fieldLabel, color: palette.textMuted)
|