mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 21:18:12 +08:00
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:
@@ -43,6 +43,7 @@
|
||||
on:dragover
|
||||
on:dragstart
|
||||
on:drop
|
||||
on:mousedown
|
||||
on:mouseup
|
||||
on:pointerdown
|
||||
on:pointerenter
|
||||
@@ -67,7 +68,6 @@ on:keydown
|
||||
on:keypress
|
||||
on:keyup
|
||||
on:lostpointercapture
|
||||
on:mousedown
|
||||
on:mouseenter
|
||||
on:mouseleave
|
||||
on:mousemove
|
||||
|
||||
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user