Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Tighten up KeyBinding (#11839)

Conrad Irwin8629a076a747
diff --git a/crates/ui/src/components/keybinding.rs b/crates/ui/src/components/keybinding.rs
index 880d3a3a47d..9cec954eda2 100644
--- a/crates/ui/src/components/keybinding.rs
+++ b/crates/ui/src/components/keybinding.rs
@@ -78,16 +78,11 @@ impl RenderOnce for KeyBinding {
)
})
.flex_none()
- .gap_2()
.children(self.key_binding.keystrokes().iter().map(|keystroke| {
let key_icon = Self::icon_for_key(keystroke);
h_flex()
.flex_none()
- .map(|el| match self.platform_style {
- PlatformStyle::Mac => el.gap_0p5(),
- PlatformStyle::Linux | PlatformStyle::Windows => el,
- })
.p_0p5()
.rounded_sm()
.text_color(cx.theme().colors().text_muted)
@@ -180,11 +175,9 @@ pub struct KeyIcon {
impl RenderOnce for KeyIcon {
fn render(self, _cx: &mut WindowContext) -> impl IntoElement {
- div().w(rems_from_px(14.)).child(
- Icon::new(self.icon)
- .size(IconSize::Small)
- .color(Color::Muted),
- )
+ Icon::new(self.icon)
+ .size(IconSize::Small)
+ .color(Color::Muted)
}
}