Skip to content

Commit 1f8831b

Browse files
authored
Add endpoint to resize MenuBar window (#490)
1 parent 2d0078f commit 1f8831b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Facades/MenuBar.php

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* @method static void show()
1111
* @method static void hide()
1212
* @method static void label(string $label)
13+
* @method static void tooltip(string $label)
14+
* @method static void icon(string $icon)
15+
* @method static void resize(int $width, int $height)
1316
* @method static void contextMenu(Menu $contextMenu)
1417
*/
1518
class MenuBar extends Facade
@@ -19,3 +22,4 @@ protected static function getFacadeAccessor()
1922
return \Native\Laravel\MenuBar\MenuBarManager::class;
2023
}
2124
}
25+

src/MenuBar/MenuBarManager.php

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ public function icon(string $icon)
4545
]);
4646
}
4747

48+
public function resize(int $width, int $height)
49+
{
50+
$this->client->post('menu-bar/resize', [
51+
'width' => $width,
52+
'height' => $height,
53+
]);
54+
}
55+
4856
public function contextMenu(Menu $contextMenu)
4957
{
5058
$this->client->post('menu-bar/context-menu', [

0 commit comments

Comments
 (0)