cocoa: fix relabel of image checkbox
This commit is contained in:
parent
262531e231
commit
f090e732fd
|
@ -87,7 +87,8 @@
|
|||
(NSSize-height (NSRect-size frame)))))))
|
||||
cocoa))
|
||||
|
||||
(define cocoa (if (and button-type
|
||||
(define-values (cocoa image-cocoa)
|
||||
(if (and button-type
|
||||
(not (string? label))
|
||||
(send label ok?))
|
||||
;; Check-box image: need an view to join a button and an image view:
|
||||
|
@ -120,8 +121,8 @@
|
|||
(make-NSRect (make-NSPoint 0 0)
|
||||
(make-NSSize new-width new-height)))
|
||||
(set-ivar! button-cocoa wxb (->wxb this))
|
||||
cocoa))
|
||||
button-cocoa))
|
||||
(values cocoa image-cocoa)))
|
||||
(values button-cocoa #f)))
|
||||
|
||||
(define we (make-will-executor))
|
||||
|
||||
|
@ -146,7 +147,7 @@
|
|||
[(string? label)
|
||||
(tellv cocoa setTitleWithMnemonic: #:type _NSString label)]
|
||||
[else
|
||||
(tellv cocoa setImage: (bitmap->image label))]))
|
||||
(tellv (or image-cocoa cocoa) setImage: (bitmap->image label))]))
|
||||
|
||||
(define callback cb)
|
||||
(define/public (clicked)
|
||||
|
|
Loading…
Reference in New Issue
Block a user