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
3232
3333 protected bool $ showDockIcon = false ;
3434
35+ protected bool $ showOnAllWorkspaces = false ;
36+
3537 protected Client $ client ;
3638
3739 public function __construct ()
@@ -95,6 +97,13 @@ public function alwaysOnTop($alwaysOnTop = true): self
9597 return $ this ;
9698 }
9799
100+ public function showOnAllWorkspaces ($ showOnAllWorkspaces = true ): self
101+ {
102+ $ this ->showOnAllWorkspaces = $ showOnAllWorkspaces ;
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+ 'showOnAllWorkspaces ' => $ this ->showOnAllWorkspaces ,
125135 ];
126136 }
127137}
Original file line number Diff line number Diff line change 99 $ menuBar = MenuBar::create ()
1010 ->showDockIcon ()
1111 ->alwaysOnTop ()
12+ ->showOnAllWorkspaces ()
1213 ->label ('milwad ' )
1314 ->icon ('nativephp.png ' )
1415 ->url ('https://github.com/milwad-dev ' )
2223
2324 $ this ->assertTrue ($ menuBarArray ['showDockIcon ' ]);
2425 $ this ->assertTrue ($ menuBarArray ['alwaysOnTop ' ]);
26+ $ this ->assertTrue ($ menuBarArray ['showOnAllWorkspaces ' ]);
2527 $ this ->assertEquals ('milwad ' , $ menuBarArray ['label ' ]);
2628 $ this ->assertEquals ('https://github.com/milwad-dev ' , $ menuBarArray ['url ' ]);
2729 $ this ->assertEquals ('nativephp.png ' , $ menuBarArray ['icon ' ]);
You can’t perform that action at this time.
0 commit comments