diff --git a/src/features/agents/Composer.tsx b/src/features/agents/Composer.tsx index 6adb3d799..f9773674e 100644 --- a/src/features/agents/Composer.tsx +++ b/src/features/agents/Composer.tsx @@ -1124,14 +1124,14 @@ export function Composer(props: ComposerProps) { {basename(suggested.rel)} {tx("Current File")} {/* The chip is the IDE context switch: off here, back on from the dashed chip. */} - + icon="close" + size="small" + /> )} {suggested && !ideContext && ( @@ -1151,7 +1151,7 @@ export function Composer(props: ComposerProps) { {file.rel} - + icon="close" + size="small" + /> ))} {images.map((img, i) => ( @@ -1170,7 +1170,7 @@ export function Composer(props: ComposerProps) { - + icon="close" + size="small" + /> ))} setPreview(null)} /> diff --git a/src/features/agents/SessionEditor.tsx b/src/features/agents/SessionEditor.tsx index a7a1d75e7..3e652b146 100644 --- a/src/features/agents/SessionEditor.tsx +++ b/src/features/agents/SessionEditor.tsx @@ -1745,14 +1745,14 @@ function ImageStrip({ images, onRemove }: { images: AgentImage[]; onRemove?: (in {img.name {onRemove && ( - + icon="close" + size="small" + /> )} ))} diff --git a/src/features/github/list/SearchPanel.tsx b/src/features/github/list/SearchPanel.tsx index 80989214f..168548867 100644 --- a/src/features/github/list/SearchPanel.tsx +++ b/src/features/github/list/SearchPanel.tsx @@ -148,16 +148,16 @@ function FilterChip({ {!set && } {set && ( - + icon="close" + size="small" + /> )} {anchor && popup(anchor, (v) => { diff --git a/src/features/vcs/log/FilterBar.tsx b/src/features/vcs/log/FilterBar.tsx index e9af6b6fd..d143317f7 100644 --- a/src/features/vcs/log/FilterBar.tsx +++ b/src/features/vcs/log/FilterBar.tsx @@ -65,14 +65,14 @@ function FilterButton({ label, value, onOpen, onClear, hidden }: LogFilter & { h {!value && } {value && ( - + icon="close" + size="small" + /> )} ); diff --git a/src/ui/Button.module.css b/src/ui/Button.module.css index 0e4a90b5e..24111dbe5 100644 --- a/src/ui/Button.module.css +++ b/src/ui/Button.module.css @@ -142,3 +142,27 @@ border: 1px solid ButtonText; } } + +.closeButton.closeButton { + display: inline-grid; + place-items: center; + cursor: default; + transition: none; +} +.closeButton.closeButton:not(:disabled):hover, +.closeButton.closeButton:not(:disabled):active { + background: transparent; +} +.closeIdle, +.closeHovered { + grid-area: 1 / 1; +} +.closeHovered { + visibility: hidden; +} +.closeButton:not(:disabled):hover .closeIdle { + visibility: hidden; +} +.closeButton:not(:disabled):hover .closeHovered { + visibility: visible; +} diff --git a/src/ui/Button.tsx b/src/ui/Button.tsx index 73cdd84b7..6ceefb1d1 100644 --- a/src/ui/Button.tsx +++ b/src/ui/Button.tsx @@ -77,6 +77,7 @@ export const IconButton = forwardRef(functio const keys = shortcut ?? (action ? shortcutLabel(action) : undefined); const busy = useRunningActions((s) => (action ? s.running.has(action) : false)); const glyphSize = iconSize ?? 16; + const close = icon === "close"; return ( ); }); diff --git a/src/workbench/WindowGroupTabs.module.css b/src/workbench/WindowGroupTabs.module.css index 73f0c9993..396ebee0d 100644 --- a/src/workbench/WindowGroupTabs.module.css +++ b/src/workbench/WindowGroupTabs.module.css @@ -27,14 +27,8 @@ .close { position: absolute; left: 6px; - display: grid; - place-items: center; width: 22px; height: 22px; - padding: 0; - border: 0; - background: transparent; - cursor: default; opacity: 0; } .item:hover .close, @@ -97,21 +91,3 @@ right: var(--stripe-outer-padding); top: 0; } - -.closeIdle, -.closeHovered { - grid-area: 1 / 1; -} -.closeHovered { - visibility: hidden; -} -.close:hover .closeIdle { - visibility: hidden; -} -.close:hover .closeHovered { - visibility: visible; -} -.close:focus-visible { - outline: 2px solid var(--focus-ring); - border-radius: var(--radius-small); -} diff --git a/src/workbench/WindowGroupTabs.tsx b/src/workbench/WindowGroupTabs.tsx index 02018baaa..8327c2efa 100644 --- a/src/workbench/WindowGroupTabs.tsx +++ b/src/workbench/WindowGroupTabs.tsx @@ -2,7 +2,7 @@ import { useLayoutEffect, 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"; @@ -149,16 +149,13 @@ export function WindowGroupTabs() { > {tab.name} - + /> ))}