mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 07:03:14 -04:00
Refactor: use a single struct Branch
This commit is contained in:
@@ -177,18 +177,8 @@ fn tree_ui(
|
||||
.default_open(true)
|
||||
.show(ui, |ui| match node {
|
||||
dock::Node::Leaf(_) => {}
|
||||
dock::Node::Tabs(tabs) => {
|
||||
for &child in &tabs.children {
|
||||
tree_ui(ui, behavior, nodes, child);
|
||||
}
|
||||
}
|
||||
dock::Node::Horizontal(layout) => {
|
||||
for &child in &layout.children {
|
||||
tree_ui(ui, behavior, nodes, child);
|
||||
}
|
||||
}
|
||||
dock::Node::Vertical(layout) => {
|
||||
for &child in &layout.children {
|
||||
dock::Node::Branch(branch) => {
|
||||
for &child in &branch.children {
|
||||
tree_ui(ui, behavior, nodes, child);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user