diff --git a/crates/fj-interop/src/status_report.rs b/crates/fj-interop/src/status_report.rs index a50b89111..4329d2867 100644 --- a/crates/fj-interop/src/status_report.rs +++ b/crates/fj-interop/src/status_report.rs @@ -13,6 +13,9 @@ impl StatusReport { /// Update the status pub fn update_status(&mut self, status: &str) { + if self.status.len() >= 5 { + self.clear_status(); + } self.status.push(status.to_string()); } @@ -22,7 +25,7 @@ impl StatusReport { } /// Reset status - pub fn clear_status(&mut self) { + fn clear_status(&mut self) { self.status.clear(); } } diff --git a/crates/fj-viewer/src/graphics/renderer.rs b/crates/fj-viewer/src/graphics/renderer.rs index 97c0be630..a2bef5f7f 100644 --- a/crates/fj-viewer/src/graphics/renderer.rs +++ b/crates/fj-viewer/src/graphics/renderer.rs @@ -427,16 +427,6 @@ impl Renderer { } let line_drawing_available = self.is_line_drawing_available(); - egui::SidePanel::right("fj-right-panel").show( - &self.egui.context, - |ui| { - ui.group(|ui| { - egui::ScrollArea::vertical().show(ui, |ui| { - ui.label(format!("Status:\n{}", status.status())) - }); - }) - }, - ); egui::SidePanel::left("fj-left-panel").show(&self.egui.context, |ui| { ui.add_space(16.0); @@ -581,6 +571,18 @@ impl Renderer { ui.add_space(16.0); }); + egui::Area::new("fj-status-message").show(&self.egui.context, |ui| { + ui.group(|ui| { + ui.add(egui::Label::new( + egui::RichText::new(format!( + "Status:\n{}", + status.status() + )) + .color(egui::Color32::BLACK), + )) + }) + }); + // End the UI frame. We could now handle the output and draw the UI with the backend. let egui_output = self.egui.context.end_frame(); let egui_paint_jobs = self.egui.context.tessellate(egui_output.shapes);