fix: Cap row_width to prevent panel from expanding infinitely
Capped row_width at 580.0 to prevent the content from pushing the panel wider than the user intends, breaking the content-width loop. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -250,7 +250,8 @@ impl App {
|
||||
// Measured once, from the panel rather than from the scrolled
|
||||
// content: reading `available_width()` inside a row makes the
|
||||
// content's width depend on the content's width.
|
||||
let row_width = ui.available_width();
|
||||
// Cap the width to prevent the panel from expanding infinitely.
|
||||
let row_width = ui.available_width().min(580.0);
|
||||
let nested = rows.iter().any(|r| r.depth > 0);
|
||||
|
||||
egui::ScrollArea::vertical()
|
||||
|
||||
Reference in New Issue
Block a user