Merge pull request #1248 from therealmate/image

fix: use the dimension of the image instead of the thumbnail's dimension
This commit is contained in:
Jeremy Soller 2025-10-09 13:24:35 -06:00 committed by GitHub
commit 52d0586a1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2271,12 +2271,11 @@ impl Item {
}
}
if let ItemThumbnail::Image(_, Some((width, height))) = self
.thumbnail_opt
.as_ref()
.unwrap_or(&ItemThumbnail::NotImage)
{
details = details.push(widget::text::body(format!("{}x{}", width, height)));
if let Some(path) = self.path_opt() {
if let Ok(img) = image::image_dimensions(path) {
let (width, height) = img;
details = details.push(widget::text::body(format!("{}x{}", width, height)));
}
}
column = column.push(details);