Clean up Element API and start on docs
This commit is contained in:
@@ -9291,9 +9291,9 @@ impl FocusableView for Editor {
|
||||
}
|
||||
|
||||
impl Render for Editor {
|
||||
type Element = EditorElement;
|
||||
type Output = EditorElement;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Output {
|
||||
let settings = ThemeSettings::get_global(cx);
|
||||
let text_style = match self.mode {
|
||||
EditorMode::SingleLine | EditorMode::AutoHeight { .. } => TextStyle {
|
||||
|
||||
@@ -2757,7 +2757,7 @@ enum Invisible {
|
||||
impl Element for EditorElement {
|
||||
type State = ();
|
||||
|
||||
fn layout(
|
||||
fn request_layout(
|
||||
&mut self,
|
||||
_element_state: Option<Self::State>,
|
||||
cx: &mut gpui::WindowContext,
|
||||
|
||||
@@ -1193,9 +1193,9 @@ impl CursorPosition {
|
||||
}
|
||||
|
||||
impl Render for CursorPosition {
|
||||
type Element = Div;
|
||||
type Output = Div;
|
||||
|
||||
fn render(&mut self, _: &mut ViewContext<Self>) -> Self::Element {
|
||||
fn render(&mut self, _: &mut ViewContext<Self>) -> Self::Output {
|
||||
div().when_some(self.position, |el, position| {
|
||||
let mut text = format!(
|
||||
"{}{FILE_ROW_COLUMN_DELIMITER}{}",
|
||||
|
||||
Reference in New Issue
Block a user