keymap ui: no command id in the row tooltip; say who draws the title

The detail pane already shows the command id. Options::title is drawn
by show(); with ui() the host's container draws its own title.
This commit is contained in:
aiongg committed 2026-10-20 21:06:07 +00:00
1 parent a03f6ab0c3
commit 1aef62823a
2 files changed
+4 -4

No files matched your search

+4 -3
View File
@@ -103,7 +103,8 @@ pub type OnWidget = Box<dyn Fn(&str, egui::Rect, &str)>;
/// set fields on it, or with [`Options::with`].
#[non_exhaustive]
pub struct Options {
/// "Keyboard Shortcuts".
/// "Keyboard Shortcuts": the window title [`ShortcutsDialog::show`] draws, and the summary's
/// heading. [`ShortcutsDialog::ui`] draws no title; the host's container shows its own.
pub title: &'static str,
/// true; false shows the table read-only with Close and Summarize.
pub editable: bool,
@@ -251,8 +252,8 @@ impl<'a> ShortcutsDialog<'a> {
})
}
/// The body only, for a host's own modal, preferences page or backstage. It fills the
/// available rectangle.
/// The body only, for a host's own modal, preferences page or backstage, which draws the
/// title. It fills the available rectangle.
pub fn ui(self, ui: &mut egui::Ui, state: &mut DialogState) -> Option<Outcome> {
self.with_env(|env| frame(ui, env, state))
}
-1
View File
@@ -960,7 +960,6 @@ impl Draw<'_, '_> {
if let Some(path) = b.paths.first().filter(|p| !p.is_empty()) {
tip.push(self.path_text(path));
}
tip.push(r.command.id.clone());
if let Some(h) = self.env.text.hint(b) {
tip.push(self.vis(&h));
}