File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ class MenuBar
3030
3131 protected bool $ alwaysOnTop = false ;
3232
33+ protected ?string $ event = null ;
34+
3335 protected bool $ showDockIcon = false ;
3436
3537 protected Client $ client ;
@@ -95,6 +97,13 @@ public function alwaysOnTop($alwaysOnTop = true): self
9597 return $ this ;
9698 }
9799
100+ public function event (string $ event ): self
101+ {
102+ $ this ->event = $ event ;
103+
104+ return $ this ;
105+ }
106+
98107 public function withContextMenu (Menu $ menu ): self
99108 {
100109 $ this ->contextMenu = $ menu ;
@@ -122,6 +131,7 @@ public function toArray(): array
122131 'onlyShowContextMenu ' => $ this ->onlyShowContextMenu ,
123132 'contextMenu ' => ! is_null ($ this ->contextMenu ) ? $ this ->contextMenu ->toArray ()['submenu ' ] : null ,
124133 'alwaysOnTop ' => $ this ->alwaysOnTop ,
134+ 'event ' => $ this ->event ,
125135 ];
126136 }
127137}
You can’t perform that action at this time.
0 commit comments