feat(window): add option to disable controls (#406)

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
This commit is contained in:
Lucas Fernandes Nogueira
2023-06-19 07:14:38 -07:00
committed by GitHub
parent 83abea3cae
commit a79d6d94bd
8 changed files with 192 additions and 4 deletions
+18
View File
@@ -78,6 +78,9 @@
let urlValue = "https://tauri.app";
let resizable = true;
let maximizable = true;
let minimizable = true;
let closable = true;
let maximized = false;
let decorations = true;
let alwaysOnTop = false;
@@ -231,6 +234,9 @@
loadWindowSize();
}
$: windowMap[selectedWindow]?.setResizable(resizable);
$: windowMap[selectedWindow]?.setMaximizable(maximizable);
$: windowMap[selectedWindow]?.setMinimizable(minimizable);
$: windowMap[selectedWindow]?.setClosable(closable);
$: maximized
? windowMap[selectedWindow]?.maximize()
: windowMap[selectedWindow]?.unmaximize();
@@ -333,6 +339,18 @@
Resizable
<input type="checkbox" bind:checked={resizable} />
</label>
<label>
Maximizable
<input type="checkbox" bind:checked={maximizable} />
</label>
<label>
Minimizable
<input type="checkbox" bind:checked={minimizable} />
</label>
<label>
Closable
<input type="checkbox" bind:checked={closable} />
</label>
<label>
Has decorations
<input type="checkbox" bind:checked={decorations} />