Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

feat(editor): window controls on the launcher too (frameless — needs its own)

yhh7141ad8f5683
diff --git a/desktop/src/launcher/Launcher.tsx b/desktop/src/launcher/Launcher.tsx
index d7c3d3ec2..e7dd383cb 100644
--- a/desktop/src/launcher/Launcher.tsx
+++ b/desktop/src/launcher/Launcher.tsx
@@ -4,6 +4,7 @@ import { useEffect, useMemo, useState } from 'react';
import { ArrowRight, Clock, FolderOpen, LayoutGrid, Plus, Rows3, Search } from 'lucide-react';
import { useEditorStore } from '@/store/editorStore';
import { ProjectStore } from '@/project/ProjectStore';
+import { WindowControls } from '@/layout/WindowControls';
import type { RecentEntry, TemplateEntry } from '@/project/format';
// Project browser shown before a project is open. A hub layout — persistent top
@@ -329,6 +330,7 @@ export function Launcher() {
<FolderOpen size={14} strokeWidth={2} /> Open folder…
</button>
</div>
+ <WindowControls />
</header>
<div className="launcher__body">
diff --git a/desktop/src/theme/launcher.css b/desktop/src/theme/launcher.css
index 2ba27bec3..11eba96e3 100644
--- a/desktop/src/theme/launcher.css
+++ b/desktop/src/theme/launcher.css
@@ -19,16 +19,21 @@
.launcher__bar {
display: flex;
align-items: center;
- justify-content: space-between;
height: 54px;
flex-shrink: 0;
padding: 0 20px 0 78px;
border-bottom: 1px solid var(--line-soft);
-webkit-app-region: drag;
}
+/* macOS-only traffic-light gutter; Windows/Linux draw their own controls (which
+ reach the right corner, so drop the right padding too). */
+.platform-win .launcher__bar,
+.platform-linux .launcher__bar { padding-left: 20px; padding-right: 0; }
.launcher__bar-actions {
display: flex;
+ align-items: center;
gap: 10px;
+ margin-left: auto; /* push actions (+ window controls) to the right */
-webkit-app-region: no-drag;
}