-
-
Notifications
You must be signed in to change notification settings - Fork 64
Allow Toggle in menus
#302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
stackotter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll give this a try locally. Have you tested on macOS and iPadOS?
macOS yes, iPadOS not specifically (I did test it on iOS, so it should work fine). |
|
It works on macOS in both the app menu and menu buttons. I haven't tested iPadOS command menus, but it crashes on iOS when used in a menu button; I tested it in a menu button with this code in WindowingExample; Menu("Open") {
Toggle("Enabled?", active: $toggle)
}This patch fixes things on my end; |
That's... new. I'll apply that patch, thanks! |
stackotter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing those issues. Looks good now. I'll just test out the Windows implementation before merging
|
I've just merged #312, please apply that approach to the logging you added to GtkBackend and Gtk3Backend so that it's consistent once merged |
This PR adds support for using
Toggles in menus. It's currently implemented in AppKitBackend, UIKitBackend, and WinUIBackend (the latter is untested at the moment because I don't have any Windows machines on hand).It's possible to implement these in GtkBackend (and probably Gtk3Backend) as well, but I'm not nearly comfortable enough with those frameworks to do that myself right now.