Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Merge branch 'main' into refine-keybindings
Nate Butlerf33cd3d4635c
diff --cc crates/ui2/src/components/icon.rsindex 48f60413c54,575b4fdb287..03ef080f4d5--- a/crates/ui2/src/components/icon.rs+++ b/crates/ui2/src/components/icon.rs@@@ -67,12 -69,8 +71,13 @@@ pub enum IconSplit,SplitMessage,Terminal,+ WholeWord,XCircle,+ Command,+ Control,+ Shift,+ Option,+ Return,}impl Icon {@@@ -133,12 -133,8 +142,13 @@@Icon::Split => "icons/split.svg",Icon::SplitMessage => "icons/split_message.svg",Icon::Terminal => "icons/terminal.svg",+ Icon::WholeWord => "icons/word_search.svg",Icon::XCircle => "icons/error.svg",+ Icon::Command => "icons/command.svg",+ Icon::Control => "icons/control.svg",+ Icon::Shift => "icons/shift.svg",+ Icon::Option => "icons/option.svg",+ Icon::Return => "icons/return.svg",}}}@@@ -150,6 -146,23 +160,23 @@@ pub struct IconElementsize: IconSize,}+ impl RenderOnce for IconElement {+ type Rendered = Svg;++ fn render(self, cx: &mut WindowContext) -> Self::Rendered {+ let svg_size = match self.size {- IconSize::Small => rems(0.75),- IconSize::Medium => rems(0.9375),++ IconSize::Small => rems(14. / 16.),++ IconSize::Medium => rems(16. / 16.),+ };++ svg()+ .size(svg_size)+ .flex_none()+ .path(self.path)+ .text_color(self.color.color(cx))+ }+ }+impl IconElement {pub fn new(icon: Icon) -> Self {Self {