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
18
18
19
19
protected string $ label = '' ;
20
20
21
+ protected bool $ onlyShowContextWindow = false ;
22
+
21
23
protected ?Menu $ contextMenu = null ;
22
24
23
25
protected bool $ alwaysOnTop = false ;
@@ -45,6 +47,13 @@ public function icon(string $icon): self
45
47
return $ this ;
46
48
}
47
49
50
+ public function onlyShowContextMenu (bool $ onlyContextMenu = true ): self
51
+ {
52
+ $ this ->onlyShowContextWindow = $ onlyContextMenu ;
53
+
54
+ return $ this ;
55
+ }
56
+
48
57
public function url (string $ url ): self
49
58
{
50
59
$ this ->url = $ url ;
@@ -94,6 +103,7 @@ public function toArray(): array
94
103
'showDockIcon ' => $ this ->showDockIcon ,
95
104
'transparency ' => $ this ->transparent ,
96
105
'backgroundColor ' => $ this ->backgroundColor ,
106
+ 'onlyShowContextWindow ' => $ this ->onlyShowContextWindow ,
97
107
'contextMenu ' => ! is_null ($ this ->contextMenu ) ? $ this ->contextMenu ->toArray ()['submenu ' ] : null ,
98
108
'alwaysOnTop ' => $ this ->alwaysOnTop ,
99
109
];
You can’t perform that action at this time.
0 commit comments