Rename IconElement
to just Icon
(#3974)
This PR renames the `IconElement` component to just `Icon`. This better matches the rest of our components, as `IconElement` was the only one using this naming convention. The `Icon` enum has been renamed to `IconName` to free up the name. I was trying to come up with a way that would allow rendering an `Icon::Zed` directly (and thus make the `IconElement` a hidden part of the API), but I couldn't come up with a way to do this cleanly. Release Notes: - N/A
This commit is contained in:
parent
29ed067b26
commit
fa53353c57
45 changed files with 364 additions and 360 deletions
|
@ -12,7 +12,7 @@ use gpui::{
|
|||
WindowContext,
|
||||
};
|
||||
use std::sync::{Arc, Weak};
|
||||
use ui::{h_stack, prelude::*, Icon, IconElement, Label};
|
||||
use ui::{h_stack, prelude::*, Icon, IconName, Label};
|
||||
|
||||
pub enum Event {
|
||||
Close,
|
||||
|
@ -100,7 +100,7 @@ impl Item for SharedScreen {
|
|||
) -> gpui::AnyElement {
|
||||
h_stack()
|
||||
.gap_1()
|
||||
.child(IconElement::new(Icon::Screen))
|
||||
.child(Icon::new(IconName::Screen))
|
||||
.child(
|
||||
Label::new(format!("{}'s screen", self.user.github_login)).color(if selected {
|
||||
Color::Default
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue