Refine naming of element-related types and traits
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
co-authored by
Max Brunsfeld
parent
03619dfa55
commit
fe492eacbf
@@ -27,7 +27,7 @@ impl View for DeployFeedbackButton {
|
||||
"DeployFeedbackButton"
|
||||
}
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Element<Self> {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> AnyElement<Self> {
|
||||
let active = self.active;
|
||||
let theme = cx.global::<Settings>().theme.clone();
|
||||
Stack::new()
|
||||
@@ -65,7 +65,7 @@ impl View for DeployFeedbackButton {
|
||||
cx,
|
||||
),
|
||||
)
|
||||
.into_element()
|
||||
.into_any()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ use gpui::{
|
||||
actions,
|
||||
elements::{ChildView, Flex, Label, ParentElement, Svg},
|
||||
platform::PromptLevel,
|
||||
serde_json, AnyViewHandle, AppContext, Drawable, Element, Entity, ModelHandle, Task, View,
|
||||
serde_json, AnyElement, AnyViewHandle, AppContext, Element, Entity, ModelHandle, Task, View,
|
||||
ViewContext, ViewHandle,
|
||||
};
|
||||
use isahc::Request;
|
||||
@@ -230,8 +230,8 @@ impl View for FeedbackEditor {
|
||||
"FeedbackEditor"
|
||||
}
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Element<Self> {
|
||||
ChildView::new(&self.editor, cx).into_element()
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> AnyElement<Self> {
|
||||
ChildView::new(&self.editor, cx).into_any()
|
||||
}
|
||||
|
||||
fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
|
||||
@@ -255,7 +255,7 @@ impl Item for FeedbackEditor {
|
||||
_: Option<usize>,
|
||||
style: &theme::Tab,
|
||||
_: &AppContext,
|
||||
) -> Element<T> {
|
||||
) -> AnyElement<T> {
|
||||
Flex::row()
|
||||
.with_child(
|
||||
Svg::new("icons/feedback_16.svg")
|
||||
@@ -271,7 +271,7 @@ impl Item for FeedbackEditor {
|
||||
.aligned()
|
||||
.contained(),
|
||||
)
|
||||
.into_element()
|
||||
.into_any()
|
||||
}
|
||||
|
||||
fn for_each_project_item(&self, cx: &AppContext, f: &mut dyn FnMut(usize, &dyn project::Item)) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use gpui::{
|
||||
elements::{Flex, Label, MouseEventHandler, ParentElement, Text},
|
||||
platform::{CursorStyle, MouseButton},
|
||||
Drawable, Element, Entity, View, ViewContext, ViewHandle,
|
||||
AnyElement, Element, Entity, View, ViewContext, ViewHandle,
|
||||
};
|
||||
use settings::Settings;
|
||||
use workspace::{item::ItemHandle, ToolbarItemLocation, ToolbarItemView};
|
||||
@@ -29,7 +29,7 @@ impl View for FeedbackInfoText {
|
||||
"FeedbackInfoText"
|
||||
}
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Element<Self> {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> AnyElement<Self> {
|
||||
let theme = cx.global::<Settings>().theme.clone();
|
||||
|
||||
Flex::row()
|
||||
@@ -68,7 +68,7 @@ impl View for FeedbackInfoText {
|
||||
.aligned()
|
||||
.left()
|
||||
.clipped()
|
||||
.into_element()
|
||||
.into_any()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use gpui::{
|
||||
elements::{Label, MouseEventHandler},
|
||||
platform::{CursorStyle, MouseButton},
|
||||
Drawable, Element, Entity, View, ViewContext, ViewHandle,
|
||||
AnyElement, Element, Entity, View, ViewContext, ViewHandle,
|
||||
};
|
||||
use settings::Settings;
|
||||
use workspace::{item::ItemHandle, ToolbarItemLocation, ToolbarItemView};
|
||||
@@ -29,7 +29,7 @@ impl View for SubmitFeedbackButton {
|
||||
"SubmitFeedbackButton"
|
||||
}
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Element<Self> {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> AnyElement<Self> {
|
||||
let theme = cx.global::<Settings>().theme.clone();
|
||||
enum SubmitFeedbackButton {}
|
||||
MouseEventHandler::<SubmitFeedbackButton, Self>::new(0, cx, |state, _| {
|
||||
@@ -52,7 +52,7 @@ impl View for SubmitFeedbackButton {
|
||||
theme.tooltip.clone(),
|
||||
cx,
|
||||
)
|
||||
.into_element()
|
||||
.into_any()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user