layout: replace panel icon with lead element and optional title
This commit is contained in:
@@ -392,15 +392,15 @@ mod tabbar_toggles {
|
||||
let dock = cx.update(|cx| {
|
||||
let dock = DockState::new(cx);
|
||||
dock.update(cx, |dock, _| {
|
||||
dock.register_panel(PanelDescriptor::new("one", "One", |_, cx| {
|
||||
cx.new(|_| DockPanel).into()
|
||||
}));
|
||||
dock.register_panel(
|
||||
PanelDescriptor::new("one", |_, cx| cx.new(|_| DockPanel).into()).title("One"),
|
||||
);
|
||||
for index in 0..14 {
|
||||
let tag = format!("panel-{index}");
|
||||
let id = tag.clone();
|
||||
dock.register_panel(PanelDescriptor::new(id, tag, |_, cx| {
|
||||
cx.new(|_| DockPanel).into()
|
||||
}));
|
||||
dock.register_panel(
|
||||
PanelDescriptor::new(id, |_, cx| cx.new(|_| DockPanel).into()).title(tag),
|
||||
);
|
||||
}
|
||||
});
|
||||
dock
|
||||
|
||||
Reference in New Issue
Block a user