ui: Expose keybinding visibility (#63770)

`KeyBinding::set_default_visibility` lets applications suppress
keybinding labels, but the current visibility value is private to
`KeyBinding::render`. Applications that compose related modifier hints
from lower-level UI elements cannot follow the same presentation policy.

Expose the existing visibility query without changing its behavior. This
lets those callers omit their complete hint, including accompanying text
and spacing, while sharing the same application-wide source of truth.

Release Notes:

- N/A
This commit is contained in:
Jakub Konka authored and GitHub committed 2026-09-04 16:21:48 +00:00
1 parent d081bbb7e1
commit 3c1fc637ad
1 file changed
+2 -1
+2 -1
View File
@@ -116,7 +116,8 @@ impl KeyBinding {
cx.refresh_windows();
}
fn default_visibility(cx: &mut App) -> bool {
/// Returns whether keybindings are visible application-wide.
pub fn default_visibility(cx: &mut App) -> bool {
cx.default_global::<KeyBindingVisibility>().0
}