File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ class MenuBar
32
32
33
33
protected bool $ showDockIcon = false ;
34
34
35
+ protected bool $ showOnAllWorkspaces = false ;
36
+
35
37
protected Client $ client ;
36
38
37
39
public function __construct ()
@@ -95,6 +97,13 @@ public function alwaysOnTop($alwaysOnTop = true): self
95
97
return $ this ;
96
98
}
97
99
100
+ public function showOnAllWorkspaces ($ showOnAllWorkspaces = true ): self
101
+ {
102
+ $ this ->showOnAllWorkspaces = $ showOnAllWorkspaces ;
103
+
104
+ return $ this ;
105
+ }
106
+
98
107
public function withContextMenu (Menu $ menu ): self
99
108
{
100
109
$ this ->contextMenu = $ menu ;
@@ -122,6 +131,7 @@ public function toArray(): array
122
131
'onlyShowContextMenu ' => $ this ->onlyShowContextMenu ,
123
132
'contextMenu ' => ! is_null ($ this ->contextMenu ) ? $ this ->contextMenu ->toArray ()['submenu ' ] : null ,
124
133
'alwaysOnTop ' => $ this ->alwaysOnTop ,
134
+ 'showOnAllWorkspaces ' => $ this ->showOnAllWorkspaces ,
125
135
];
126
136
}
127
137
}
Original file line number Diff line number Diff line change 9
9
$ menuBar = MenuBar::create ()
10
10
->showDockIcon ()
11
11
->alwaysOnTop ()
12
+ ->showOnAllWorkspaces ()
12
13
->label ('milwad ' )
13
14
->icon ('nativephp.png ' )
14
15
->url ('https://github.com/milwad-dev ' )
22
23
23
24
$ this ->assertTrue ($ menuBarArray ['showDockIcon ' ]);
24
25
$ this ->assertTrue ($ menuBarArray ['alwaysOnTop ' ]);
26
+ $ this ->assertTrue ($ menuBarArray ['showOnAllWorkspaces ' ]);
25
27
$ this ->assertEquals ('milwad ' , $ menuBarArray ['label ' ]);
26
28
$ this ->assertEquals ('https://github.com/milwad-dev ' , $ menuBarArray ['url ' ]);
27
29
$ this ->assertEquals ('nativephp.png ' , $ menuBarArray ['icon ' ]);
You can’t perform that action at this time.
0 commit comments