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 @@ -18,6 +18,8 @@ class MenuBar
1818
1919 protected string $ label = '' ;
2020
21+ protected bool $ onlyShowContextWindow = false ;
22+
2123 protected ?Menu $ contextMenu = null ;
2224
2325 protected bool $ alwaysOnTop = false ;
@@ -45,6 +47,13 @@ public function icon(string $icon): self
4547 return $ this ;
4648 }
4749
50+ public function onlyShowContextMenu (bool $ onlyContextMenu = true ): self
51+ {
52+ $ this ->onlyShowContextWindow = $ onlyContextMenu ;
53+
54+ return $ this ;
55+ }
56+
4857 public function url (string $ url ): self
4958 {
5059 $ this ->url = $ url ;
@@ -94,6 +103,7 @@ public function toArray(): array
94103 'showDockIcon ' => $ this ->showDockIcon ,
95104 'transparency ' => $ this ->transparent ,
96105 'backgroundColor ' => $ this ->backgroundColor ,
106+ 'onlyShowContextWindow ' => $ this ->onlyShowContextWindow ,
97107 'contextMenu ' => ! is_null ($ this ->contextMenu ) ? $ this ->contextMenu ->toArray ()['submenu ' ] : null ,
98108 'alwaysOnTop ' => $ this ->alwaysOnTop ,
99109 ];
You can’t perform that action at this time.
0 commit comments