diff --git a/egui_node_graph/src/editor_ui.rs b/egui_node_graph/src/editor_ui.rs index 5481aa3..974c176 100644 --- a/egui_node_graph/src/editor_ui.rs +++ b/egui_node_graph/src/editor_ui.rs @@ -184,7 +184,12 @@ where if let Some(ref mut node_finder) = self.node_finder { let mut node_finder_area = Area::new("node_finder").order(Order::Foreground); if let Some(pos) = node_finder.position { - node_finder_area = node_finder_area.current_pos(pos); + let pos_x = if pos.x > ui.available_width() - 300. { + pos.x - 300. + } else { + pos.x + }; + node_finder_area = node_finder_area.current_pos(pos2(pos_x, pos.y)); } node_finder_area.show(ui.ctx(), |ui| { if let Some(node_kind) = node_finder.show(ui, all_kinds, user_state) { diff --git a/egui_node_graph/src/node_finder.rs b/egui_node_graph/src/node_finder.rs index c0a6b2f..58832b8 100644 --- a/egui_node_graph/src/node_finder.rs +++ b/egui_node_graph/src/node_finder.rs @@ -52,6 +52,7 @@ where ui.visuals_mut().widgets.noninteractive.fg_stroke = Stroke::new(2.0, text_color); let frame = Frame::dark_canvas(ui.style()) + .rounding(10.) .fill(background_color) .inner_margin(vec2(5.0, 5.0));