yay zooming woohoo

This commit is contained in:
itsjunetime
2025-06-15 18:11:22 -06:00
parent a67ff7996c
commit 0578fccfa6
6 changed files with 127 additions and 49 deletions
+9 -1
View File
@@ -331,6 +331,9 @@ async fn enter_redraw_loop(
InputAction::Search(term) => to_renderer.send(RenderNotif::Search(term))?,
InputAction::Invert => to_renderer.send(RenderNotif::Invert)?,
InputAction::Fullscreen => fullscreen = !fullscreen,
InputAction::SwitchRenderZoom(f_or_f) => {
to_renderer.send(RenderNotif::SwitchFitOrFill(f_or_f)).unwrap();
}
}
}
},
@@ -354,7 +357,12 @@ async fn enter_redraw_loop(
}
Some(img_res) = from_converter.next() => {
match img_res {
Ok(ConvertedPage { page, num, num_results }) => tui.page_ready(page, num, num_results),
Ok(ConvertedPage { page, num, num_results }) => {
tui.page_ready(page, num, num_results);
if num == tui.page {
needs_redraw = true;
}
},
Err(e) => tui.show_error(e),
}
},