Skip to content

Add endpoint to resize MenuBar window #490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Facades/MenuBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -19,3 +22,4 @@ protected static function getFacadeAccessor()
return \Native\Laravel\MenuBar\MenuBarManager::class;
}
}

8 changes: 8 additions & 0 deletions src/MenuBar/MenuBarManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand Down