mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 17:44:18 +01:00
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:
@@ -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