Skip to content

Add fullscreenable support #340

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 3 commits into from
Aug 7, 2024
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
2 changes: 1 addition & 1 deletion src/Commands/MinifyApplicationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function handle()
$this->cleanUpEnvFile($appPath);
$this->removeIgnoredFilesAndFolders($appPath);

$compactor = new Php();
$compactor = new Php;

$phpFiles = Finder::create()
->files()
Expand Down
2 changes: 1 addition & 1 deletion src/Dialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(protected Client $client) {}

public static function new()
{
return new static(new Client());
return new static(new Client);
}

public function title(string $title): self
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/NativeAppBootedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __invoke(Request $request)
$provider = app(config('nativephp.provider'));
$provider->boot();

event(new ApplicationBooted());
event(new ApplicationBooted);

return response()->json([
'success' => true,
Expand Down
4 changes: 2 additions & 2 deletions src/Menu/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(protected Client $client) {}

public static function new(): static
{
return new static(new Client());
return new static(new Client);
}

public function register(): void
Expand All @@ -51,7 +51,7 @@ public function submenu(string $header, Menu $submenu): static

public function separator(): static
{
return $this->add(new Separator());
return $this->add(new Separator);
}

public function quit(): static
Expand Down
2 changes: 1 addition & 1 deletion src/MenuBar/MenuBarManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function __construct(protected Client $client) {}

public function create()
{
return (new PendingCreateMenuBar())->setClient($this->client);
return (new PendingCreateMenuBar)->setClient($this->client);
}

public function show()
Expand Down
2 changes: 1 addition & 1 deletion src/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct(protected Client $client) {}

public static function new()
{
return new static(new Client());
return new static(new Client);
}

public function title(string $title): self
Expand Down
2 changes: 1 addition & 1 deletion src/ProgressBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(protected int $maxSteps, protected Client $client) {

public static function create(int $maxSteps): static
{
return new static($maxSteps, new Client());
return new static($maxSteps, new Client);
}

public function start()
Expand Down
2 changes: 1 addition & 1 deletion src/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function printToPDF(string $html): string

public function timezone(): string
{
$timezones = new Timezones();
$timezones = new Timezones;

if (PHP_OS_FAMILY === 'Windows') {
$timezone = $timezones->translateFromWindowsString(exec('tzutil /g'));
Expand Down
12 changes: 11 additions & 1 deletion src/Windows/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class Window

protected bool $fullscreen = false;

protected bool $fullscreenable = true;

protected bool $kiosk = false;

protected $rememberState = false;
Expand Down Expand Up @@ -202,13 +204,20 @@ public function hideMenu($autoHideMenuBar = true): static
return $this;
}

public function fullscreen($fullscreen = false): static
public function fullscreen($fullscreen = true): static
{
$this->fullscreen = $fullscreen;

return $this;
}

public function fullscreenable($fullscreenable = true): static
{
$this->fullscreenable = $fullscreenable;

return $this;
}

public function kiosk($kiosk = false): static
{
$this->kiosk = $kiosk;
Expand Down Expand Up @@ -247,6 +256,7 @@ public function toArray()
'closable' => $this->closable,
'title' => $this->title,
'fullscreen' => $this->fullscreen,
'fullscreenable' => $this->fullscreenable,
'kiosk' => $this->kiosk,
'autoHideMenuBar' => $this->autoHideMenuBar,
];
Expand Down
Loading