Clean compile with redesigned element traits
This commit is contained in:
parent
0673606de8
commit
33cd6f520a
35 changed files with 278 additions and 216 deletions
|
@ -9,7 +9,7 @@ pub mod terminal_panel;
|
|||
// use crate::terminal_element::TerminalElement;
|
||||
use editor::{scroll::autoscroll::Autoscroll, Editor};
|
||||
use gpui::{
|
||||
actions, div, img, red, Action, AnyElement, AppContext, Component, DispatchPhase, Div,
|
||||
actions, div, img, red, Action, AnyElement, AppContext, DispatchPhase, Div, Element,
|
||||
EventEmitter, FocusEvent, FocusHandle, Focusable, FocusableElement, FocusableView,
|
||||
InputHandler, InteractiveElement, KeyDownEvent, Keystroke, Model, MouseButton, ParentElement,
|
||||
Pixels, Render, SharedString, Styled, Task, View, ViewContext, VisualContext, WeakView,
|
||||
|
@ -538,7 +538,7 @@ impl TerminalView {
|
|||
}
|
||||
}
|
||||
|
||||
impl Render for TerminalView {
|
||||
impl Render<Self> for TerminalView {
|
||||
type Element = Focusable<Self, Div<Self>>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
|
@ -578,7 +578,7 @@ impl Render for TerminalView {
|
|||
.children(
|
||||
self.context_menu
|
||||
.clone()
|
||||
.map(|context_menu| div().z_index(1).absolute().child(context_menu.render())),
|
||||
.map(|context_menu| div().z_index(1).absolute().child(context_menu)),
|
||||
)
|
||||
.track_focus(&self.focus_handle)
|
||||
.on_focus_in(Self::focus_in)
|
||||
|
@ -756,8 +756,8 @@ impl Item for TerminalView {
|
|||
|
||||
div()
|
||||
.child(img().uri("icons/terminal.svg").bg(red()))
|
||||
.child(title)
|
||||
.render()
|
||||
.child(SharedString::from(title))
|
||||
.into_any()
|
||||
}
|
||||
|
||||
fn clone_on_split(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue