From c132265d31ada21f87baf56def0fabde63d7bca7 Mon Sep 17 00:00:00 2001 From: mow Date: Thu, 15 Jan 2026 18:20:14 +0100 Subject: [PATCH] refactor: use zoom_factor() method in footer Simplifies the zoom text calculation and eliminates the 'method zoom_factor is never used' warning. --- src/app/view/footer.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/view/footer.rs b/src/app/view/footer.rs index 8dec49b..83beeb2 100644 --- a/src/app/view/footer.rs +++ b/src/app/view/footer.rs @@ -15,8 +15,13 @@ pub fn view(model: &AppModel) -> Element<'_, AppMessage> { // Zoom level display. let zoom_text = match model.view_mode { ViewMode::Fit => "Fit".to_string(), - ViewMode::ActualSize => "100%".to_string(), - ViewMode::Custom(z) => format!("{}%", (z * 100.0).round() as i32), + _ => { + if let Some(zoom) = model.zoom_factor() { + format!("{}%", (zoom * 100.0).round() as i32) + } else { + "Fit".to_string() + } + } }; // Document dimensions (if available).