From 627a216e62e7c2fb3b21df721595be690deeddf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20K=C3=A4llstrand=20Modig?= Date: Thu, 6 Feb 2025 10:52:11 +0100 Subject: [PATCH] Add endpoint to resize MenuBar window --- src/Facades/MenuBar.php | 4 ++++ src/MenuBar/MenuBarManager.php | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/Facades/MenuBar.php b/src/Facades/MenuBar.php index 97abad96..15d9879f 100644 --- a/src/Facades/MenuBar.php +++ b/src/Facades/MenuBar.php @@ -10,6 +10,9 @@ * @method static void show() * @method static void hide() * @method static void label(string $label) + * @method static void tooltip(string $label) + * @method static void icon(string $icon) + * @method static void resize(int $width, int $height) * @method static void contextMenu(Menu $contextMenu) */ class MenuBar extends Facade @@ -19,3 +22,4 @@ protected static function getFacadeAccessor() return \Native\Laravel\MenuBar\MenuBarManager::class; } } + diff --git a/src/MenuBar/MenuBarManager.php b/src/MenuBar/MenuBarManager.php index b10992dd..f9c2bdea 100644 --- a/src/MenuBar/MenuBarManager.php +++ b/src/MenuBar/MenuBarManager.php @@ -45,6 +45,14 @@ public function icon(string $icon) ]); } + public function resize(int $width, int $height) + { + $this->client->post('menu-bar/resize', [ + 'width' => $width, + 'height' => $height, + ]); + } + public function contextMenu(Menu $contextMenu) { $this->client->post('menu-bar/context-menu', [