notebook: fix heights of nodes
some nodes can overflow their contents, so let's use a scroll view to fix Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
1 parent
1ab4eeb48c
commit
f592015c0c
1 file changed
+4
-2
@@ -48,8 +48,10 @@ fn node_ui(ui: &mut egui::Ui, node: &Node) -> egui::Response {
|
||||
|
||||
fn text_node_ui(ui: &mut egui::Ui, node: &TextNode) -> egui::Response {
|
||||
node_box_ui(ui, node.node(), |ui| {
|
||||
ui.with_layout(egui::Layout::left_to_right(Align::Min), |ui| {
|
||||
ui.add(Label::new(node.text()).wrap_mode(TextWrapMode::Wrap))
|
||||
egui::ScrollArea::vertical().show(ui, |ui| {
|
||||
ui.with_layout(egui::Layout::left_to_right(Align::Min), |ui| {
|
||||
ui.add(Label::new(node.text()).wrap_mode(TextWrapMode::Wrap))
|
||||
});
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user