-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: menu items on Mac (maybe also other OSs?) #6
Comments
Hey @Bellisario, Thanks for reaching out. The problem with mac seems to be kown upstream with webview and macOS I'll look into it and think about a solution that is fitting for this binding. As a quick-fix solution to implement shortcuts for now - though without a menu: You could implement shortcuts in JS. E.g. a cmd+q shortcut could call a V function to exit the application. |
In regards to the custom menu items, I am busy developing a custom one for V using C, currently its still very early on and only supports Windows, but I am hoping to add Linux soon after, but MacOS will be a bit challenging since, I don't own a Mac, so will need someone else who is willing to help with that. Here is a basic example. @ttytm I am hoping once I am done to allow me to create a simple example of using both webview and Vtray together. |
Sounds awesome @Ouri028! If both libs complement each other ofc. you can add an example. For a mac tray someone added a nice example to the examples in the V repo a while ago, it might help with mac as well https://github.com/vlang/v/tree/master/examples/macos_tray |
Currently on Mac you need to click the close button to quit.
Would be useful to allow the usage of "standard" macOS shortcut for app actions (ex. CMD+Q, CMD+W, CMD+H, CMD+M, etc.).
Also, custom menu items support as Electron or Tauri would be fantastic.
Anyway, I tried looking in the Tauri source code but I was not able to understand the code (I'm not a Rust DEV), but I found the implementation should be here: https://github.com/tauri-apps/tauri/blob/dev/core/tauri-runtime/src/menu.rs
The text was updated successfully, but these errors were encountered: