mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-18 08:02:27 +00:00
Render active item in pane
This commit is contained in:
parent
8b1b7a2f80
commit
3605afc163
1 changed files with 7 additions and 5 deletions
|
@ -25,8 +25,8 @@ use std::{
|
|||
Arc,
|
||||
},
|
||||
};
|
||||
use ui::v_stack;
|
||||
use ui::{prelude::*, Icon, IconButton, IconColor, IconElement};
|
||||
use ui::{v_stack};
|
||||
use util::truncate_and_remove_front;
|
||||
|
||||
#[derive(PartialEq, Clone, Copy, Deserialize, Debug)]
|
||||
|
@ -1897,15 +1897,17 @@ impl Pane {
|
|||
|
||||
impl Render for Pane {
|
||||
type Element = Div<Self>;
|
||||
// fn ui_name() -> &'static str {
|
||||
// "Pane"
|
||||
// }
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
v_stack()
|
||||
.child(self.render_tab_bar(cx))
|
||||
.child(div() /* toolbar */)
|
||||
.child(div() /* active item */)
|
||||
.child(if let Some(item) = self.active_item() {
|
||||
item.to_any().render()
|
||||
} else {
|
||||
// todo!()
|
||||
div().child("Empty Pane").render()
|
||||
})
|
||||
|
||||
// enum MouseNavigationHandler {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue