Normalize hover/active feedback across chrome surfaces

Brings hover/active opacity feedback to a consistent 0.92/0.82 baseline
across the omnibar content, the home search pill, and the workspace
picker tile + add button. The home search pill and the omnibar styled
URL display previously had no hover state at all, so the click target
felt invisible. The motion design framework wants every interactive
element to acknowledge hover and click; this change closes the gap
without introducing new keyframe animations (GPUI 0.2.2 has no
transition layer to drive them).
This commit is contained in:
2026-05-09 18:43:03 -04:00
parent a8deebcf1a
commit 60400a78d1
3 changed files with 6 additions and 3 deletions
@@ -62,6 +62,8 @@ fn render_search_bar(cx: &mut Context<ElyShell>) -> AnyElement {
.items_center()
.gap(px(12.0))
.cursor_pointer()
.hover(|style| style.opacity(0.94))
.active(|style| style.opacity(0.85))
.on_click(cx.listener(|shell, _, window, cx| {
shell.focus_address_bar(window, cx);
}))
@@ -86,8 +86,8 @@ fn render_workspaces_tile(cx: &mut Context<ElyShell>) -> AnyElement {
.justify_center()
.text_color(rgb(colors::ACCENT))
.cursor_pointer()
.hover(|style| style.opacity(0.85))
.active(|style| style.opacity(0.7))
.hover(|style| style.opacity(0.92))
.active(|style| style.opacity(0.82))
.on_click(cx.listener(|shell, _, window, cx| {
shell.open_internal_tab("ely://settings/spaces", window, cx);
}))
@@ -171,7 +171,7 @@ fn render_add_workspace_button(cx: &mut Context<ElyShell>) -> AnyElement {
.text_color(rgb(colors::INK_3))
.cursor_pointer()
.hover(|style| style.bg(rgba(PICKER_BG)).text_color(rgb(colors::INK)))
.active(|style| style.opacity(0.7))
.active(|style| style.opacity(0.82))
.on_click(cx.listener(|shell, _, window, cx| {
shell.open_internal_tab("ely://settings/spaces", window, cx);
}))
@@ -96,6 +96,7 @@ fn render_omnibar(
.flex_1()
.min_w_0()
.cursor_pointer()
.hover(|style| style.opacity(0.92))
.on_click(cx.listener(|shell, _, window, cx| {
shell.focus_address_bar(window, cx);
}))