From 75794eb7c71f63105d13fa303077256d32039f28 Mon Sep 17 00:00:00 2001 From: Anthony Date: Wed, 16 Jul 2025 18:09:39 -0400 Subject: [PATCH] Add tooltips for edit icon and exact match toggle icon --- crates/settings_ui/src/keybindings.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/crates/settings_ui/src/keybindings.rs b/crates/settings_ui/src/keybindings.rs index e0105fa87518f93382a47ef32e2b5d2d3320228f..84d240fbaae2774bdf2c3718ff9fb542992378cb 100644 --- a/crates/settings_ui/src/keybindings.rs +++ b/crates/settings_ui/src/keybindings.rs @@ -1273,6 +1273,18 @@ impl Render for KeymapEditor { ) .shape(IconButtonShape::Square) .toggle_state(exact_match) + .tooltip(move |window, cx| { + Tooltip::for_action( + if exact_match { + "Partial match mode" + } else { + "Exact match mode" + }, + &ToggleExactKeystrokeMatching, + window, + cx, + ) + }) .on_click( cx.listener(|_, _, window, cx| { window.dispatch_action( @@ -1345,7 +1357,14 @@ impl Render for KeymapEditor { .unwrap_or_else(|| { base_button_style(index, IconName::Pencil) .visible_on_hover(row_group_id(index)) - .tooltip(Tooltip::text("Edit Keybinding")) + .tooltip(|window, cx| { + Tooltip::for_action( + "Edit Keybinding", + &EditBinding, + window, + cx, + ) + }) .on_click(cx.listener(move |this, _, window, cx| { this.select_index(index, cx); this.open_edit_keybinding_modal(false, window, cx);