From fd1cebdf988de936b45f63f9ec656ed48a69c608 Mon Sep 17 00:00:00 2001
From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
Date: Sat, 14 Nov 2026 11:48:44 +0800
Subject: [PATCH] fix(window): lay out project window tabs evenly with centred
titles (#3285)
Project tabs of a merged window group now share the row equally with the project name centred; the close button sits on the left and shows on hover or keyboard focus, and the selected tab is marked by its background instead of an accent underline. The folder icon is gone. Reordering, the context menu and keyboard navigation are unchanged.
Closes #3266
---
src/workbench/WindowGroupTabs.module.css | 23 +++++++++++++++++------
src/workbench/WindowGroupTabs.tsx | 4 ++--
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/workbench/WindowGroupTabs.module.css b/src/workbench/WindowGroupTabs.module.css
index 8eb7ae680..936432fe5 100644
--- a/src/workbench/WindowGroupTabs.module.css
+++ b/src/workbench/WindowGroupTabs.module.css
@@ -13,14 +13,25 @@
overflow-x: auto;
min-width: 0;
}
+/* Tabs share the row equally with the title centred, the close button on the left on hover. */
.item {
+ position: relative;
display: flex;
align-items: center;
- flex: 0 1 220px;
- min-width: 100px;
+ flex: 1 1 0;
+ min-width: 120px;
border-radius: var(--radius-small);
color: var(--fg-muted);
}
+.close {
+ position: absolute;
+ left: 4px;
+ opacity: 0;
+}
+.item:hover .close,
+.item:focus-within .close {
+ opacity: 1;
+}
.item:hover {
background: var(--bg-hover);
}
@@ -31,19 +42,19 @@
.dragging {
opacity: 0.55;
}
-.selected {
+.selected,
+.selected:hover {
background: var(--bg-island);
color: var(--fg);
- box-shadow: inset 0 -2px var(--accent);
}
.tab {
display: flex;
align-items: center;
- gap: 8px;
+ justify-content: center;
flex: 1;
min-width: 0;
height: 30px;
- padding: 0 10px;
+ padding: 0 28px;
border: 0;
color: inherit;
background: transparent;
diff --git a/src/workbench/WindowGroupTabs.tsx b/src/workbench/WindowGroupTabs.tsx
index 588091b1f..2e8fde2fd 100644
--- a/src/workbench/WindowGroupTabs.tsx
+++ b/src/workbench/WindowGroupTabs.tsx
@@ -2,7 +2,7 @@ import { useRef, useState } from "react";
import { executeAction } from "@/platform/actions";
import { useTx } from "@/platform/i18n";
import { reorderedTabs, useWindowGroup } from "@/platform/windowGroups";
-import { Icon, IconButton, showContextMenu } from "@/ui";
+import { IconButton, showContextMenu } from "@/ui";
import { notifications } from "./contributions";
import styles from "./WindowGroupTabs.module.css";
@@ -105,10 +105,10 @@ export function WindowGroupTabs() {
run(executeAction("window.selectTab", tabs[next]!.label));
}}
>
-
{tab.name}