@@ -134,7 +134,7 @@ class ClickableView: NSView {
134134 notification. key. withCString { keyPtr in
135135 rustOnNotificationConfirm ( keyPtr)
136136 }
137- notification. dismissWithUserAction ( )
137+ notification. dismiss ( )
138138 }
139139 }
140140
@@ -239,30 +239,30 @@ class ActionButton: NSButton {
239239 wantsLayer = true
240240 isBordered = false
241241 bezelStyle = . rounded
242- controlSize = . regular
243- font = NSFont . systemFont ( ofSize: 14 , weight: . semibold )
242+ controlSize = . small
243+ font = NSFont . systemFont ( ofSize: 12 , weight: . medium )
244244 focusRingType = . none
245245
246246 contentTintColor = NSColor ( calibratedWhite: 0.1 , alpha: 1.0 )
247247 if #available( macOS 11 . 0 , * ) {
248248 bezelColor = NSColor ( calibratedWhite: 0.9 , alpha: 1.0 )
249249 }
250250
251- layer? . cornerRadius = 10
251+ layer? . cornerRadius = 8
252252 layer? . backgroundColor = NSColor ( calibratedWhite: 0.95 , alpha: 0.9 ) . cgColor
253253 layer? . borderColor = NSColor ( calibratedWhite: 0.7 , alpha: 0.5 ) . cgColor
254254 layer? . borderWidth = 0.5
255255
256256 layer? . shadowColor = NSColor ( calibratedWhite: 0.0 , alpha: 0.5 ) . cgColor
257- layer? . shadowOpacity = 0.3
258- layer? . shadowRadius = 3
257+ layer? . shadowOpacity = 0.2
258+ layer? . shadowRadius = 2
259259 layer? . shadowOffset = CGSize ( width: 0 , height: 1 )
260260 }
261261
262262 override var intrinsicContentSize : NSSize {
263263 var s = super. intrinsicContentSize
264- s. width += 22
265- s. height = max ( 28 , s. height + 4 )
264+ s. width += 12
265+ s. height = max ( 24 , s. height + 2 )
266266 return s
267267 }
268268
@@ -547,8 +547,7 @@ class NotificationManager {
547547
548548 NSLayoutConstraint . activate ( [
549549 contentView. leadingAnchor. constraint ( equalTo: effectView. leadingAnchor, constant: 12 ) ,
550- contentView. trailingAnchor. constraint (
551- equalTo: effectView. trailingAnchor, constant: - 35 ) ,
550+ contentView. trailingAnchor. constraint ( equalTo: effectView. trailingAnchor, constant: - 12 ) ,
552551 contentView. topAnchor. constraint ( equalTo: effectView. topAnchor, constant: 9 ) ,
553552 contentView. bottomAnchor. constraint ( equalTo: effectView. bottomAnchor, constant: - 9 ) ,
554553 ] )
@@ -617,8 +616,14 @@ class NotificationManager {
617616 textStack. addArrangedSubview ( titleLabel)
618617 textStack. addArrangedSubview ( bodyLabel)
619618
619+ let actionButton = ActionButton ( )
620+ actionButton. title = " Take notes "
621+ actionButton. notification = notification
622+ actionButton. setContentHuggingPriority ( . required, for: . horizontal)
623+
620624 container. addArrangedSubview ( iconContainer)
621625 container. addArrangedSubview ( textStack)
626+ container. addArrangedSubview ( actionButton)
622627
623628 return container
624629 }
0 commit comments