Skip to content

Commit 1fdd34b

Browse files
authored
Add fullscreenable support (#340)
* Add fullscreenable support * Fix styling * Change default parameter value --------- Co-authored-by: simonhamp <[email protected]>
1 parent 047c774 commit 1fdd34b

File tree

9 files changed

+20
-10
lines changed

9 files changed

+20
-10
lines changed

src/Commands/MinifyApplicationCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function handle()
2626
$this->cleanUpEnvFile($appPath);
2727
$this->removeIgnoredFilesAndFolders($appPath);
2828

29-
$compactor = new Php();
29+
$compactor = new Php;
3030

3131
$phpFiles = Finder::create()
3232
->files()

src/Dialog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(protected Client $client) {}
3030

3131
public static function new()
3232
{
33-
return new static(new Client());
33+
return new static(new Client);
3434
}
3535

3636
public function title(string $title): self

src/Http/Controllers/NativeAppBootedController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function __invoke(Request $request)
1212
$provider = app(config('nativephp.provider'));
1313
$provider->boot();
1414

15-
event(new ApplicationBooted());
15+
event(new ApplicationBooted);
1616

1717
return response()->json([
1818
'success' => true,

src/Menu/Menu.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(protected Client $client) {}
2525

2626
public static function new(): static
2727
{
28-
return new static(new Client());
28+
return new static(new Client);
2929
}
3030

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

5252
public function separator(): static
5353
{
54-
return $this->add(new Separator());
54+
return $this->add(new Separator);
5555
}
5656

5757
public function quit(): static

src/MenuBar/MenuBarManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function __construct(protected Client $client) {}
1111

1212
public function create()
1313
{
14-
return (new PendingCreateMenuBar())->setClient($this->client);
14+
return (new PendingCreateMenuBar)->setClient($this->client);
1515
}
1616

1717
public function show()

src/Notification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct(protected Client $client) {}
1616

1717
public static function new()
1818
{
19-
return new static(new Client());
19+
return new static(new Client);
2020
}
2121

2222
public function title(string $title): self

src/ProgressBar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __construct(protected int $maxSteps, protected Client $client) {
2020

2121
public static function create(int $maxSteps): static
2222
{
23-
return new static($maxSteps, new Client());
23+
return new static($maxSteps, new Client);
2424
}
2525

2626
public function start()

src/System.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function printToPDF(string $html): string
5858

5959
public function timezone(): string
6060
{
61-
$timezones = new Timezones();
61+
$timezones = new Timezones;
6262

6363
if (PHP_OS_FAMILY === 'Windows') {
6464
$timezone = $timezones->translateFromWindowsString(exec('tzutil /g'));

src/Windows/Window.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class Window
1717

1818
protected bool $fullscreen = false;
1919

20+
protected bool $fullscreenable = true;
21+
2022
protected bool $kiosk = false;
2123

2224
protected $rememberState = false;
@@ -202,13 +204,20 @@ public function hideMenu($autoHideMenuBar = true): static
202204
return $this;
203205
}
204206

205-
public function fullscreen($fullscreen = false): static
207+
public function fullscreen($fullscreen = true): static
206208
{
207209
$this->fullscreen = $fullscreen;
208210

209211
return $this;
210212
}
211213

214+
public function fullscreenable($fullscreenable = true): static
215+
{
216+
$this->fullscreenable = $fullscreenable;
217+
218+
return $this;
219+
}
220+
212221
public function kiosk($kiosk = false): static
213222
{
214223
$this->kiosk = $kiosk;
@@ -247,6 +256,7 @@ public function toArray()
247256
'closable' => $this->closable,
248257
'title' => $this->title,
249258
'fullscreen' => $this->fullscreen,
259+
'fullscreenable' => $this->fullscreenable,
250260
'kiosk' => $this->kiosk,
251261
'autoHideMenuBar' => $this->autoHideMenuBar,
252262
];

0 commit comments

Comments
 (0)