From 641319f391a60d4727fc857a7e048b7dc97e2d1d Mon Sep 17 00:00:00 2001 From: Elliott Slaughter Date: Mon, 29 Jul 2024 12:15:23 -0700 Subject: [PATCH] Ensure we always render each table row at least one line high. --- src/app.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index 8dbd7cc..dd83080 100644 --- a/src/app.rs +++ b/src/app.rs @@ -2401,6 +2401,9 @@ impl ProfApp { return None; }; + let font_id = TextStyle::Body.resolve(ui.style()); + let row_height = ui.fonts(|f| f.row_height(&font_id)); + let mut result: Option<(ItemLocator, Interval)> = None; TableBuilder::new(ui) .striped(true) @@ -2414,7 +2417,8 @@ impl ProfApp { let width = body.widths()[1]; let ui = body.ui_mut(); - let height = Self::compute_field_height(field, width, cx.item_link_mode, ui); + let height = Self::compute_field_height(field, width, cx.item_link_mode, ui) + .max(row_height); body.row(height, |mut row| { row.col(|ui| {