From 127acede25906e3ba781304d79eb8c71fe94772f Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Wed, 3 Jan 2024 11:37:49 -0500 Subject: [PATCH] Update keybinding rendering --- crates/ui2/src/components/keybinding.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/ui2/src/components/keybinding.rs b/crates/ui2/src/components/keybinding.rs index 4c51e0f742..2ffab23bb1 100644 --- a/crates/ui2/src/components/keybinding.rs +++ b/crates/ui2/src/components/keybinding.rs @@ -23,9 +23,9 @@ impl RenderOnce for KeyBinding { h_stack() .flex_none() .gap_0p5() - .bg(cx.theme().colors().element_background) .p_0p5() .rounded_sm() + .text_color(cx.theme().colors().text_muted) .when(keystroke.modifiers.function, |el| el.child(Key::new("fn"))) .when(keystroke.modifiers.control, |el| { el.child(KeyIcon::new(Icon::Control)) @@ -111,7 +111,7 @@ impl RenderOnce for Key { .h(rems(14. / 16.)) .text_ui() .line_height(relative(1.)) - .text_color(cx.theme().colors().text) + .text_color(cx.theme().colors().text_muted) .child(self.key.clone()) } } @@ -131,9 +131,11 @@ impl RenderOnce for KeyIcon { type Output = Div; fn render(self, _cx: &mut WindowContext) -> Self::Output { - div() - .w(rems(14. / 16.)) - .child(IconElement::new(self.icon).size(IconSize::Small)) + div().w(rems(14. / 16.)).child( + IconElement::new(self.icon) + .size(IconSize::Small) + .color(Color::Muted), + ) } }