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

Nextron tray menue #395

Closed
noevermaurice opened this issue Sep 3, 2023 · 2 comments
Closed

Nextron tray menue #395

noevermaurice opened this issue Sep 3, 2023 · 2 comments

Comments

@noevermaurice
Copy link

I would like to use the electron tray menu in nextron for macOS how do i implement this and where ? please code example

@makeusabrew
Copy link

Disclaimer: I'm only just getting started with Nextron, but...

As far as I can tell, creating a tray menu is exactly the same as in a normal Electron app. So, the best code example to start off with would be the official Electron Tray docs.

You can configure your tray once app.whenReady() has fired, e.g. you could create and configure it around here: https://github.com/saltyshiomix/nextron/blob/main/examples/_template/ts/main/background.ts#L15

(Note that in the official Electron examples the tray object is declared outside of the promise callback, which you should respect - I believe it's to stop the object being accidentally garbage collected).

@saltyshiomix
Copy link
Owner

@makeusabrew
Thank you for your comment!

@noevermaurice
Any updates on this?

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

No branches or pull requests

3 participants