Make slash commands more discoverable (#12480)

<img width="648" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/a63df904-fbbe-4e0a-80b2-c98ebee90690">

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2024-05-30 16:45:05 +02:00 committed by GitHub
parent 436a8fa0ce
commit a259042f92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 172 additions and 100 deletions

View file

@ -357,7 +357,7 @@ impl Render for ContextMenu {
.unwrap_or_else(|| {
KeyBinding::for_action(&**action, cx)
})
.map(|binding| div().ml_1().child(binding))
.map(|binding| div().ml_4().child(binding))
})),
)
.on_click(move |_, cx| {

View file

@ -77,13 +77,14 @@ impl RenderOnce for KeyBinding {
.join(" ")
)
})
.gap(rems(0.125))
.flex_none()
.children(self.key_binding.keystrokes().iter().map(|keystroke| {
let key_icon = Self::icon_for_key(keystroke);
h_flex()
.flex_none()
.p_0p5()
.py_0p5()
.rounded_sm()
.text_color(cx.theme().colors().text_muted)
.when(keystroke.modifiers.function, |el| {