parent
0757bf5a5c
commit
37ac3de2b8
3 changed files with 17 additions and 4 deletions
1
NEWS
1
NEWS
|
|
@ -2,6 +2,7 @@
|
||||||
====
|
====
|
||||||
|
|
||||||
- Fix fractional scaling beeing blury by setting GDK_DEBUG=gl-no-fractional as default
|
- Fix fractional scaling beeing blury by setting GDK_DEBUG=gl-no-fractional as default
|
||||||
|
- Fix exposure times above 0.5 seconds not being displayed correctly in properties
|
||||||
|
|
||||||
46.1
|
46.1
|
||||||
====
|
====
|
||||||
|
|
|
||||||
|
|
@ -254,10 +254,21 @@ impl Metadata {
|
||||||
if let Some(exif) = &self.exif {
|
if let Some(exif) = &self.exif {
|
||||||
let field = exif.get_field(exif::Tag::ExposureTime, exif::In::PRIMARY)?;
|
let field = exif.get_field(exif::Tag::ExposureTime, exif::In::PRIMARY)?;
|
||||||
if let exif::Value::Rational(rational) = &field.value {
|
if let exif::Value::Rational(rational) = &field.value {
|
||||||
let exposure = format!("{:.0}", 1. / rational.first()?.to_f32());
|
let speed = rational.first()?.to_f32();
|
||||||
|
|
||||||
// Translators: Unit for exposure time in seconds
|
if speed <= 0.5 {
|
||||||
|
let exposure = format!("{:.0}", 1. / speed);
|
||||||
|
// Translators: Fractional exposure time (photography) in seconds
|
||||||
return Some(gettext_f("1\u{2215}{}\u{202F}s", [exposure]));
|
return Some(gettext_f("1\u{2215}{}\u{202F}s", [exposure]));
|
||||||
|
} else {
|
||||||
|
let exposure = if speed < 5. {
|
||||||
|
format!("{:.1}", speed)
|
||||||
|
} else {
|
||||||
|
format!("{:.0}", speed)
|
||||||
|
};
|
||||||
|
// Translators: Exposure time (photography) in seconds
|
||||||
|
return Some(gettext_f("{}\u{202F}s", [exposure]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,10 @@ use adw::prelude::*;
|
||||||
use crate::deps::*;
|
use crate::deps::*;
|
||||||
|
|
||||||
mod imp {
|
mod imp {
|
||||||
|
use std::cell::OnceCell;
|
||||||
|
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
use glib::{ParamSpec, Properties, Value};
|
use glib::{ParamSpec, Properties, Value};
|
||||||
use std::cell::OnceCell;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue