From 44a29d7fc7eaba8369f72324c05828bcade3acd2 Mon Sep 17 00:00:00 2001 From: squareSphere29 <18124696+squareSphere29@users.noreply.github.com> Date: Sun, 11 Oct 2026 18:08:41 +0800 Subject: [PATCH] fix: EXIF values under histogram run together (#913) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Filter empty EXIF values and join with ' · ' separator (matches grid.rs pattern) - Single centered text element — no overlap possible - Fixes 'ISO 1000200mm' visual collision when focal length or aperture missing --- crates/ui-egui/src/panels/edit.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/crates/ui-egui/src/panels/edit.rs b/crates/ui-egui/src/panels/edit.rs index 0e4c4c83e..45cb5a0f8 100644 --- a/crates/ui-egui/src/panels/edit.rs +++ b/crates/ui-egui/src/panels/edit.rs @@ -561,7 +561,7 @@ fn histogram(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) { // EXIF strip if let Some(ph) = app.session.catalog.photo(id) { let m = &ph.meta; - let items: Vec = [ + let parts: Vec = [ m.iso.map(|i| format!("ISO {i}")), m.focal_mm.map(|f| format!("{f:.0}mm")), m.aperture.map(|a| format!("f/{a:.1}")), @@ -571,18 +571,11 @@ fn histogram(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) { .flatten() .collect(); - if !items.is_empty() { + if !parts.is_empty() { + let text = parts.join(" · "); let y = r.bottom() - 13.0; - let count = items.len() as f32; - for (i, s) in items.iter().enumerate() { - let x = r.left() + 18.0 + (r.width() - 36.0) * (i as f32 + 0.5) / count; - let align = match i { - 0 => Align2::LEFT_CENTER, - _ if i == items.len() - 1 => Align2::RIGHT_CENTER, - _ => Align2::CENTER_CENTER, - }; - p.text(pos2(x, y), align, s, t.font(12.5), t.text_label); - } + let x = r.left() + r.width() / 2.0; + p.text(pos2(x, y), Align2::CENTER_CENTER, text, t.font(12.5), t.text_label); } } }