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}