-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[V2] Mac: Cannot show menus correctly #1588
Comments
emmm, I need to add these code before:
because Mac default occupied the first position of the Menuitem, and cannot change the label name |
So is it that the docs need improving? It's not clear what's happening with this ticket 👍 |
The documentation clearly includes
under Reference > Menus |
Great. Can this be closed then? |
@acheong08 @leaanthony Sorry, I may not express it clearly. According to the document, I cannot show the submenu
and then, I can add other menu that I customized or P.S. |
Confirmed on MacOS 12.4. The first Menu will always be the Application menu on MacOS, documentation needs to be updated. runtime.Quit() needs ctx which cannot be easily obtained in main.go. It is better to create a Quit function in app.go and set cmd+q to a.Quit() |
MacOS always sets the first menu item to the application name. A blank AppMenu should thus be appended to mitigate the issue of displaced menus. runtime.Quit() now requires context.Context. Pointing to a Quit function in `app.go` is easier.
Happy to accept a PR for your commit 👍 |
* Update example for macOS compatibility Reference #1588 * Add comments, remove duplicates
Awesome, thanks~ |
* Add troubleshooting for `Not Found` error (#1586) Issues with Vite's optimizer * Remove usage of unsafe.Pointer in winc (#1556) * Remove usage of unsafe.Pointer * [windows] Remove MakeIntResource and add overloads for Load functions * Fix `EnumProc` race condition. * Refactor `EnumDisplayMonitors` to use `unsafe.Pointer` instead of `uintptr` Co-authored-by: stffabi <stffabi@users.noreply.github.com> * [windows] Fix stack corruption when using ICoreWebView2HttpHeadersCollectionIterator (#1589) The API expects a `BOOL *` with `typedef int BOOL` therefore we need to use a `int32` on the stack. * Docs/better homepage (#1591) * Better carousel width * Learn more button * Learn more button * Fix button/width * Update introduction * Fix outline colour * remove custom css * remove default css * use secondary button * Update sponsors. Improve website for mobile. * v2.0.0-beta.39 * fix docs again (cherry picked from commit 0a9ae0d) * Fix docs for good * Docs FTLOG * Fix docs again! * Fix Varly link * Fix Varly link * Update example for macOS Menu (#1600) * Update example for macOS compatibility Reference #1588 * Add comments, remove duplicates * Add compatibility for Go1.17 (#1605) * v2.0.0-beta.39.2 * [v2] Fix plain template (#1609) * [template] Add missing main.go file to plain template * [dev] If wails could not be find in go.mod output a gracefull error message * Install dev dependencies before starting dev mode (#1615) * Add Show() and Hide() to runtime to show/hide application (#1599) * Add Show() and Hide() to runtime to show/hide application * Fix devserver * Update API docs * Fix container size (#1616) * Update Crowdin configuration file * Update Crowdin configuration file * Update Crowdin configuration file * Bump terser from 4.8.0 to 4.8.1 in /runtime/js (#1625) Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump terser from 5.12.0 to 5.14.2 in /website (#1627) Bumps [terser](https://github.com/terser/terser) from 5.12.0 to 5.14.2. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Antonio <acheong@student.dalat.org> Co-authored-by: Lea Anthony <lea.anthony@gmail.com> Co-authored-by: stffabi <stffabi@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Description
Cannot show menus correctly on mac. Location and label display is not what I expect. I don't know if the document needs to be updated? (e.g. runtime.Quit now needs ctx of lifecycle, but document of
Menus
do not show this.)To Reproduce
Mycode:
Expected behaviour
display correct
Screenshots
No response
Attempted Fixes
No response
System Details
Additional context
No response
The text was updated successfully, but these errors were encountered: