Desktop: Hook up native window controls (#3161)

* Implement window controls

* Fix drag target size

* Maximize with drag area double click
This commit is contained in:
Timon
2025-09-13 20:15:52 +00:00
committed by GitHub
parent e97d5520e8
commit 944a6eeea2
9 changed files with 29 additions and 4 deletions
@@ -76,13 +76,15 @@
<TextButton label={entry.label} icon={entry.icon} menuListChildren={entry.children} action={entry.action} flush={true} />
{/each}
{/if}
<LayoutRow on:mousedown={() => editor.handle.appWindowDrag()} on:dblclick={() => editor.handle.appWindowMaximize()} />
</LayoutRow>
<!-- Document title -->
<LayoutRow class="center">
<LayoutRow class="center" on:mousedown={() => editor.handle.appWindowDrag()} on:dblclick={() => editor.handle.appWindowMaximize()}>
<WindowTitle text={windowTitle} />
</LayoutRow>
<!-- Window buttons (except on Mac) -->
<LayoutRow class="right">
<LayoutRow on:mousedown={() => editor.handle.appWindowDrag()} on:dblclick={() => editor.handle.appWindowMaximize()} />
{#if platform === "Windows"}
<WindowButtonsWindows {maximized} />
{:else if platform === "Linux"}