更改Tauri的任务栏菜单

发布于 2025-01-23 19:02:28 字数 462 浏览 0 评论 0原文

我正在使用 tauri ,并想更改使用右鼠标在任务栏中单击我的应用程序时显示的菜单项按钮(Windows/Linux)或双击(MACOS)。

例如,Firefox显示“打开新窗口”,音乐播放器经常显示“ Play/Pause”或“ Next Track”按钮。如何与Tauri做到这一点?

我知道Tauri中有SystemTrayMenu,但这似乎只会影响系统托盘,而不是任务栏。

(我的意思是“ taskbar”:您单击以打开它们的应用程序图标的线,通常表示哪些正在运行。我认为Macos称其为dock,在窗口中,它在启动按钮和时钟之间的底部, Linux不是很均匀,但是在Ubuntu中,它默认情况下是垂直的。我的意思是您的浏览器通常出现,而不是您的VPN出现的位置。

I'm using Tauri and would like to change the menu items shown when clicking my application in the taskbar using the right mouse button (Windows/Linux) or double click (MacOS).

For example Firefox shows "Open a New Window" and music players often show "Play/Pause" or "Next track" buttons. How to do that with Tauri?

I'm aware of SystemTrayMenu in Tauri, but that only seems to affect the system tray, not the task bar.

(What I mean by "taskbar": the line of application icons that you click to open them, and that usually indicate which ones are running. I think MacOS calls it Dock, in Windows it's at the bottom between start button and clock, and Linux isn't very homogeneous but in Ubuntu it's vertically on the left by default. I do not mean the system tray of usually smaller icons that are almost always next to the clock, that are usually more like background services. I.e. I mean where your browser usually shown up, not where your VPN usually shows up.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绳情 2025-01-30 19:02:28

目前Tauri不支持这一点(2022-06-27)。您可以提交功能请求。

Tauri does not support this at the moment (2022-06-27). You may file a feature request.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文