Skip to content
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

Manipulating the menu bar #211

Open
alirezamecheng opened this issue Aug 4, 2019 · 3 comments
Open

Manipulating the menu bar #211

alirezamecheng opened this issue Aug 4, 2019 · 3 comments
Labels

Comments

@alirezamecheng
Copy link

alirezamecheng commented Aug 4, 2019

I found that in the Linux OS the menu bar will show up but in the Microsoft Windows OS, it doesn't.
It may be a consequence of the electron behavior and not the Blink package. But it would be nice to have a way to customize the menu and or removing it.

@NHDaly
Copy link
Collaborator

NHDaly commented Aug 5, 2019

There definitely are ways to modify the menu, but not super well-documented on our end.

First, you can pass electron configuration options when creating a new Blink window, which is documented here:
https://juliagizmos.github.io/Blink.jl/latest/api/#Blink.AtomShell.Window
Looking at the list of all electron options, autoHideMenuBar might be applicable?:
https://electronjs.org/docs/api/browser-window#new-browserwindowoptions

Also, you can always access any of the electron API through javascript, so in the past I've had success editing the menu bar via javascript:

        const {app, Menu} = require('electron').remote
        ...
        const menu = Menu.buildFromTemplate(template)
        Menu.setApplicationMenu(menu)

@NHDaly
Copy link
Collaborator

NHDaly commented Aug 5, 2019

If you do find the settings you want, could you please report them back here, or make a PR to the documentation to explain how you did it? :) Thanks!

@NHDaly
Copy link
Collaborator

NHDaly commented Aug 22, 2019

Also, this seems related to #94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants