Add tooltips for edit icon and exact match toggle icon
This commit is contained in:
parent
e23a4564cc
commit
75794eb7c7
1 changed files with 20 additions and 1 deletions
|
@ -1273,6 +1273,18 @@ impl Render for KeymapEditor {
|
||||||
)
|
)
|
||||||
.shape(IconButtonShape::Square)
|
.shape(IconButtonShape::Square)
|
||||||
.toggle_state(exact_match)
|
.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(
|
.on_click(
|
||||||
cx.listener(|_, _, window, cx| {
|
cx.listener(|_, _, window, cx| {
|
||||||
window.dispatch_action(
|
window.dispatch_action(
|
||||||
|
@ -1345,7 +1357,14 @@ impl Render for KeymapEditor {
|
||||||
.unwrap_or_else(|| {
|
.unwrap_or_else(|| {
|
||||||
base_button_style(index, IconName::Pencil)
|
base_button_style(index, IconName::Pencil)
|
||||||
.visible_on_hover(row_group_id(index))
|
.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| {
|
.on_click(cx.listener(move |this, _, window, cx| {
|
||||||
this.select_index(index, cx);
|
this.select_index(index, cx);
|
||||||
this.open_edit_keybinding_modal(false, window, cx);
|
this.open_edit_keybinding_modal(false, window, cx);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue