ui: Use focus_visible method for some components (#41077)

Using the cool, [recently
added](https://github.com/zed-industries/zed/pull/40940) `focus-visible`
support in some components. This will be particularly nice in the
settings UI, as it will not display the focus styles if you're
navigating it with a pointer device as opposed to the keyboard.

Release Notes:

- N/A
This commit is contained in:
Danilo Leal
2025-10-24 05:47:53 +00:00
committed by GitHub
parent f45a9b351d
commit 4fb91135d1
5 changed files with 18 additions and 17 deletions
+1 -1
View File
@@ -338,7 +338,7 @@ impl<T: NumberFieldType> RenderOnce for NumberField<T> {
.border_color(border_color)
.bg(bg_color)
.hover(|s| s.bg(hover_bg_color))
.focus(|s| s.border_color(focus_border_color).bg(hover_bg_color))
.focus_visible(|s| s.border_color(focus_border_color).bg(hover_bg_color))
.child(Icon::new(icon).size(IconSize::Small))
};