File tree 3 files changed +11
-5
lines changed
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> {
307
307
self
308
308
}
309
309
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**.
311
311
pub fn menu_on_left_click ( mut self , enable : bool ) -> Self {
312
312
self . inner = self . inner . with_menu_on_left_click ( enable) ;
313
313
self
@@ -549,9 +549,9 @@ impl<R: Runtime> TrayIcon<R> {
549
549
Ok ( ( ) )
550
550
}
551
551
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**.
553
553
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" ) ) ]
555
555
run_item_main_thread ! ( self , |self_: Self | self_
556
556
. inner
557
557
. set_show_menu_on_left_click( enable) ) ?;
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ export interface TrayIconOptions {
113
113
* Use the icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**.
114
114
*/
115
115
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**. */
117
117
menuOnLeftClick ?: boolean
118
118
/** A handler for an event on the tray icon. */
119
119
action ?: ( event : TrayIconEvent ) => void
@@ -278,7 +278,7 @@ export class TrayIcon extends Resource {
278
278
} )
279
279
}
280
280
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**. */
282
282
async setMenuOnLeftClick ( onLeft : boolean ) : Promise < void > {
283
283
return invoke ( 'plugin:tray|set_show_menu_on_left_click' , {
284
284
rid : this . rid ,
You can’t perform that action at this time.
0 commit comments