Skip to content

Commit

Permalink
cocoa,canvas: fix bezel-cell frame for FocusView
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdanp authored and mflatt committed Apr 25, 2024
1 parent 688e20d commit 3a800c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gui-lib/mred/private/wx/cocoa/canvas.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@
(tell (tell NSTextFieldCell alloc) initTextCell: #:type _NSString ""))
(tellv bezel-cell setBezeled: #:type _BOOL #t)

(define-objc-class FocusView NSView
(define-objc-class FocusView NSView
[on?]
(-a _void (setFocusState: [_BOOL is-on?])
(set! on? is-on?))
(-a #:async-apply (box (void))
_void (drawRect: [_NSRect r])
(let ([f (tell #:type _NSRect self frame)])
(tellv bezel-cell
(tellv bezel-cell
drawWithFrame: #:type _NSRect (make-NSRect (make-NSPoint 2 2)
(let ([s (NSRect-size r)])
(let ([s (NSRect-size f)])
(make-NSSize (- (NSSize-width s) 4)
(- (NSSize-height s) 4))))
inView: self))
Expand Down

0 comments on commit 3a800c8

Please sign in to comment.