mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-07 12:05:34 +00:00
Update television/preview/previewers/files.rs
This commit is contained in:
parent
2a02c7801e
commit
49da575cde
@ -284,7 +284,7 @@ pub fn try_preview(
|
||||
};
|
||||
if let Some(image) = option_image {
|
||||
let preview_window_dimension = preview_window.map(|rect| {
|
||||
(u32::from(rect.width - 2), u32::from(rect.height - 2)) // - 2 for the marge
|
||||
(u32::from(rect.width.saturating_sub(2)), u32::from(rect.height.saturating_sub(2))) // - 2 for the margin
|
||||
});
|
||||
let image_preview_widget = ImagePreviewWidget::from_dynamic_image(
|
||||
image,
|
||||
|
Loading…
x
Reference in New Issue
Block a user