properties_view: Only show decimal places when dimensions are fractional
This commit is contained in:
parent
36cf667cc8
commit
58a77ec9fa
1 changed files with 7 additions and 1 deletions
|
|
@ -263,7 +263,13 @@ impl LpPropertiesView {
|
|||
_ => None::<(f64, f64)>,
|
||||
}
|
||||
})
|
||||
.map(|(w, h)| format!("{w:.1} \u{D7} {h:.1}"))
|
||||
.map(|(w, h)| {
|
||||
if w.fract() != 0.0 || h.fract() != 0.0 {
|
||||
format!("{w:.1} \u{D7} {h:.1}")
|
||||
} else {
|
||||
format!("{w} \u{D7} {h}")
|
||||
}
|
||||
})
|
||||
} else {
|
||||
gdk_pixbuf::Pixbuf::file_info_future(path.unwrap())
|
||||
.await
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue