summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/components/titlebar.tsx
diff options
context:
space:
mode:
authorFilip <[email protected]>2026-01-29 21:51:56 +0100
committerGitHub <[email protected]>2026-01-29 14:51:56 -0600
commitaa1d0f6167f57e22aa7252d4dcd10672c4a63fbf (patch)
treec741e9d5bc5880d7618df0be60bcdd88816b0254 /packages/app/src/components/titlebar.tsx
parentfdd484d2c1fa9073f12ead11502b845bc8d3a114 (diff)
downloadopencode-aa1d0f6167f57e22aa7252d4dcd10672c4a63fbf.tar.gz
opencode-aa1d0f6167f57e22aa7252d4dcd10672c4a63fbf.zip
fix(app): better header item wrapping (#10831)
Diffstat (limited to 'packages/app/src/components/titlebar.tsx')
-rw-r--r--packages/app/src/components/titlebar.tsx35
1 files changed, 23 insertions, 12 deletions
diff --git a/packages/app/src/components/titlebar.tsx b/packages/app/src/components/titlebar.tsx
index e3831c70f..001f7a567 100644
--- a/packages/app/src/components/titlebar.tsx
+++ b/packages/app/src/components/titlebar.tsx
@@ -132,12 +132,14 @@ export function Titlebar() {
}
return (
- <header class="h-10 shrink-0 bg-background-base flex items-center relative" data-tauri-drag-region>
+ <header
+ class="h-10 shrink-0 bg-background-base relative grid grid-cols-[auto_minmax(0,1fr)_auto] items-center"
+ data-tauri-drag-region
+ >
<div
classList={{
- "flex items-center w-full min-w-0": true,
+ "flex items-center min-w-0": true,
"pl-2": !mac(),
- "pr-6": !windows(),
}}
onMouseDown={drag}
data-tauri-drag-region
@@ -218,20 +220,29 @@ export function Titlebar() {
</div>
</div>
<div id="opencode-titlebar-left" class="flex items-center gap-3 min-w-0 px-2" data-tauri-drag-region />
- <div class="flex-1 h-full" data-tauri-drag-region />
- <div
- id="opencode-titlebar-right"
- class="flex items-center gap-3 shrink-0 flex-1 justify-end"
- data-tauri-drag-region
- />
+ </div>
+
+ <div
+ class="min-w-0 flex items-center justify-center pointer-events-none lg:absolute lg:inset-0 lg:flex lg:items-center lg:justify-center"
+ data-tauri-drag-region
+ >
+ <div id="opencode-titlebar-center" class="pointer-events-auto w-full min-w-0 flex justify-center lg:w-fit" />
+ </div>
+
+ <div
+ classList={{
+ "flex items-center min-w-0 justify-end": true,
+ "pr-6": !windows(),
+ }}
+ onMouseDown={drag}
+ data-tauri-drag-region
+ >
+ <div id="opencode-titlebar-right" class="flex items-center gap-3 shrink-0 justify-end" data-tauri-drag-region />
<Show when={windows()}>
<div class="w-6 shrink-0" />
<div data-tauri-decorum-tb class="flex flex-row" />
</Show>
</div>
- <div class="absolute inset-0 flex items-center justify-center pointer-events-none">
- <div id="opencode-titlebar-center" class="pointer-events-auto" />
- </div>
</header>
)
}