File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri " : patch:bug
3+ ---
4+
5+ Support for ` set_show_menu_on_left_click ` was implemented on Windows too. So it
6+ should not be macOS anymore. [ tauri-apps/tray-icon #199 ] ( https://github.com/tauri-apps/tray-icon/pull/199 )
Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ impl<R: Runtime> TrayIconBuilder<R> {
307307 self
308308 }
309309
310- /// Whether to show the tray menu on left click or not, default is `true`. **macOS only**.
310+ /// Whether to show the tray menu on left click or not, default is `true`. **macOS & Windows only**.
311311 pub fn menu_on_left_click ( mut self , enable : bool ) -> Self {
312312 self . inner = self . inner . with_menu_on_left_click ( enable) ;
313313 self
@@ -549,9 +549,9 @@ impl<R: Runtime> TrayIcon<R> {
549549 Ok ( ( ) )
550550 }
551551
552- /// Disable or enable showing the tray menu on left click. **macOS only**.
552+ /// Disable or enable showing the tray menu on left click. **macOS & Windows only**.
553553 pub fn set_show_menu_on_left_click ( & self , #[ allow( unused) ] enable : bool ) -> crate :: Result < ( ) > {
554- #[ cfg( target_os = "macos" ) ]
554+ #[ cfg( any ( target_os = "macos" , target_os = "windows" ) ) ]
555555 run_item_main_thread ! ( self , |self_: Self | self_
556556 . inner
557557 . set_show_menu_on_left_click( enable) ) ?;
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ export interface TrayIconOptions {
113113 * Use the icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**.
114114 */
115115 iconAsTemplate ?: boolean
116- /** Whether to show the tray menu on left click or not, default is `true`. **macOS only**. */
116+ /** Whether to show the tray menu on left click or not, default is `true`. **macOS & Windows only**. */
117117 menuOnLeftClick ?: boolean
118118 /** A handler for an event on the tray icon. */
119119 action ?: ( event : TrayIconEvent ) => void
@@ -278,7 +278,7 @@ export class TrayIcon extends Resource {
278278 } )
279279 }
280280
281- /** Disable or enable showing the tray menu on left click. **macOS only**. */
281+ /** Disable or enable showing the tray menu on left click. **macOS & Windows only**. */
282282 async setMenuOnLeftClick ( onLeft : boolean ) : Promise < void > {
283283 return invoke ( 'plugin:tray|set_show_menu_on_left_click' , {
284284 rid : this . rid ,
You can’t perform that action at this time.
0 commit comments