Fix OK dialog width padding to avoid text clipping

This commit is contained in:
2026-05-31 19:47:13 +02:00
parent eabb0fe27a
commit 837c34320e
+1 -1
View File
@@ -220,7 +220,7 @@ pub fn draw_confirm_popup(
}
pub fn draw_ok_dialog(f: &mut Frame, _app: &AppState, title: &str, message: &str) {
let content_w = message.lines().map(|l| l.len()).max().unwrap_or(20).max(title.len()) as u16 + 6;
let content_w = message.lines().map(|l| l.len()).max().unwrap_or(20).max(title.len()) as u16 + 10;
let popup_w = content_w.max(50).min(f.area().width.saturating_sub(4));
let popup_h = (message.lines().count() as u16 + 7).min(f.area().height.saturating_sub(4));
let area = centered_rect_size(popup_w, popup_h, f.area());