gtk-rs / examples

DEPRECATED, use https://github.com/gtk-rs/gtk-rs repository instead!
MIT License
283 stars 76 forks source link

How to set app menu bar on macOS? #302

Closed kornelski closed 4 years ago

kornelski commented 4 years ago

There's a menu bar example, but it creates an in-window menu, which is inappropriate for macOS.

I've found that there's GtkApplicationExt::set_menubar that might be setting the native screen-top menu bar, but this method wants gio::MenuModel, and I can't find documentation how to create that object in Rust.

GuillaumeGomez commented 4 years ago

I'm building a "system" menu bar here: https://github.com/GuillaumeGomez/process-viewer/blob/master/src/process_viewer.rs#L361

kornelski commented 4 years ago

Thanks!