Made flags -f, --fullscreen not taking argument (#109)

Now, its presence alone is enough to activate the full-screen option.
This commit is contained in:
tatounee
2025-11-07 01:18:57 +01:00
committed by GitHub
parent 3628d21c74
commit 6b37976357
+2 -2
View File
@@ -87,7 +87,7 @@ async fn inner_main() -> Result<(), WrappedErr> {
/// The maximum number of pages to display together, horizontally, at a time /// The maximum number of pages to display together, horizontally, at a time
optional -m,--max-wide max_wide: NonZeroUsize optional -m,--max-wide max_wide: NonZeroUsize
/// Fullscreen the pdf (hide document name, page count, etc) /// Fullscreen the pdf (hide document name, page count, etc)
optional -f,--fullscreen fullscreen: bool optional -f,--fullscreen
/// The number of pages to prerender surrounding the currently-shown page; 0 means no /// The number of pages to prerender surrounding the currently-shown page; 0 means no
/// limit. By default, there is no limit. /// limit. By default, there is no limit.
optional -p,--prerender prerender: usize optional -p,--prerender prerender: usize
@@ -300,7 +300,7 @@ async fn inner_main() -> Result<(), WrappedErr> {
})?; })?;
} }
let fullscreen = flags.fullscreen.unwrap_or_default(); let fullscreen = flags.fullscreen;
let main_area = Tui::main_layout(&term.get_frame(), fullscreen); let main_area = Tui::main_layout(&term.get_frame(), fullscreen);
to_renderer to_renderer
.send(RenderNotif::Area(main_area.page_area)) .send(RenderNotif::Area(main_area.page_area))