You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The callback action could do anything (but most likely be used to set an observable), and likewise, updating the #:checked observable would update the visible state of the menu item.
The function could be named menu-item or checkable-menu-item, but I think it's cuter to have checkable and non-checkable items both be called menu-item because then all the menu labels will align in the source code:
(menu-item "Debug..."; <-- the left edge of this string...
(λ () (show-debug-window)))
(menu-item "High Contrast"; <-- ...lines up with the left edge of this string!
(λ (checked) (:= @high-contrast? checked))
#:checked @high-contrast?)
The text was updated successfully, but these errors were encountered:
I think this would be nice to add, but I'd prefer to add a new checkable-menu-item view to avoid overloading the menu-item action. Would you like to work on that? If not, I'll do it in the coming weeks.
Seems to be supported by racket/gui: https://docs.racket-lang.org/gui/checkable-menu-item_.html
I imagine the API would look something like:
The callback action could do anything (but most likely be used to set an observable), and likewise, updating the #:checked observable would update the visible state of the menu item.
The function could be named
menu-item
orcheckable-menu-item
, but I think it's cuter to have checkable and non-checkable items both be calledmenu-item
because then all the menu labels will align in the source code:The text was updated successfully, but these errors were encountered: