Tidy up Edit in json footer entries (#41890)

Before:
<img width="350" height="109" alt="before"
src="https://github.com/user-attachments/assets/d5d3e6bd-3a65-4d7d-8585-1e4d8f72997f"
/>

After:
<img width="310" height="103" alt="after"
src="https://github.com/user-attachments/assets/40137084-7323-4a79-b95b-a020c418646b"
/>

* All items got a keybinding label
* All items were made of a non-small size, to match the text size in the
right button
* Keybindings are rendered as disabled for disabled buttons

Release Notes:

- N/A

Co-authored-by: Lukas Wirth <lukas@zed.dev>
This commit is contained in:
Kirill Bulatov
2025-11-05 00:49:47 +02:00
committed by GitHub
co-authored by Lukas Wirth
parent ba7ea71c00
commit 4339c772e4
2 changed files with 11 additions and 7 deletions
@@ -285,6 +285,10 @@ impl Disableable for Button {
/// This results in a button that is disabled and does not respond to click events.
fn disabled(mut self, disabled: bool) -> Self {
self.base = self.base.disabled(disabled);
self.key_binding = self
.key_binding
.take()
.map(|binding| binding.disabled(disabled));
self
}
}