mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-23 03:04:19 +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,9 +48,11 @@ fn node_ui(ui: &mut egui::Ui, node: &Node) -> egui::Response {
|
|||||||
|
|
||||||
fn text_node_ui(ui: &mut egui::Ui, node: &TextNode) -> egui::Response {
|
fn text_node_ui(ui: &mut egui::Ui, node: &TextNode) -> egui::Response {
|
||||||
node_box_ui(ui, node.node(), |ui| {
|
node_box_ui(ui, node.node(), |ui| {
|
||||||
|
egui::ScrollArea::vertical().show(ui, |ui| {
|
||||||
ui.with_layout(egui::Layout::left_to_right(Align::Min), |ui| {
|
ui.with_layout(egui::Layout::left_to_right(Align::Min), |ui| {
|
||||||
ui.add(Label::new(node.text()).wrap_mode(TextWrapMode::Wrap))
|
ui.add(Label::new(node.text()).wrap_mode(TextWrapMode::Wrap))
|
||||||
});
|
});
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user