fix: improve tab bar styling and prevent tab resize on switch (#414)
- Make the "+" new tab button a compact rounded icon button instead of a full-height rectangle - Increase titlebar height from 38px to 42px for better proportions - Remove font-medium from active tabs to prevent layout shift when switching between tabs
This commit is contained in:
@@ -280,8 +280,8 @@
|
||||
/* ── Titlebar ────────────────────────────────────────── */
|
||||
|
||||
.titlebar {
|
||||
height: 38px;
|
||||
min-height: 38px;
|
||||
height: 42px;
|
||||
min-height: 42px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
@@ -128,7 +128,7 @@ export default function EditorFileTab({
|
||||
)}
|
||||
<span className="mr-1.5 flex min-w-0 items-baseline gap-1.5">
|
||||
<span
|
||||
className={`truncate max-w-[130px]${file.isPreview ? ' italic' : ''}${isActive ? ' font-medium' : ''}`}
|
||||
className={`truncate max-w-[130px]${file.isPreview ? ' italic' : ''}`}
|
||||
style={tabStatusColor ? { color: tabStatusColor } : undefined}
|
||||
>
|
||||
{getEditorDisplayLabel(file)}
|
||||
|
||||
@@ -156,9 +156,7 @@ export default function SortableTab({
|
||||
<TerminalIcon
|
||||
className={`w-3.5 h-3.5 mr-1.5 shrink-0 ${isActive ? 'text-foreground' : 'text-muted-foreground'}`}
|
||||
/>
|
||||
<span className={`truncate max-w-[130px] mr-1.5${isActive ? ' font-medium' : ''}`}>
|
||||
{tab.customTitle ?? tab.title}
|
||||
</span>
|
||||
<span className="truncate max-w-[130px] mr-1.5">{tab.customTitle ?? tab.title}</span>
|
||||
{tab.color && (
|
||||
<span
|
||||
className="mr-1.5 size-2 rounded-full shrink-0"
|
||||
|
||||
@@ -201,12 +201,12 @@ export default function TabBar({
|
||||
</SortableContext>
|
||||
</DndContext>
|
||||
<button
|
||||
className="flex items-center justify-center w-9 h-full shrink-0 text-muted-foreground hover:text-foreground hover:bg-accent/50"
|
||||
className="flex items-center justify-center w-7 h-7 my-auto mx-1 shrink-0 rounded text-muted-foreground hover:text-foreground hover:bg-accent/50"
|
||||
style={{ WebkitAppRegion: 'no-drag' } as React.CSSProperties}
|
||||
onClick={onNewTab}
|
||||
title="New terminal (Cmd+T)"
|
||||
>
|
||||
<Plus className="w-4 h-4" />
|
||||
<Plus className="w-3.5 h-3.5" />
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user