propertiesView: Add User Comment

This commit is contained in:
Sophie Herold 2024-11-13 17:32:27 +01:00
parent 9156533fea
commit a351c7751e
5 changed files with 19 additions and 6 deletions

View file

@ -39,7 +39,7 @@ use crate::util::gettext::*;
#[derive(Default, Debug)]
pub struct Metadata {
mime_type: Option<String>,
exif: gufo::Metadata,
pub exif: gufo::Metadata,
file_info: Option<FileInfo>,
image_info: Option<glycin::ImageInfoDetails>,
frame_info: Option<FrameDetails>,

View file

@ -72,6 +72,8 @@ mod imp {
#[template_child]
originally_created: TemplateChild<adw::ActionRow>,
#[template_child]
user_comment: TemplateChild<adw::ActionRow>,
#[template_child]
aperture: TemplateChild<adw::ActionRow>,
#[template_child]
exposure: TemplateChild<adw::ActionRow>,
@ -225,6 +227,7 @@ mod imp {
let has_details = [
Self::update_row(&self.location, metadata.gps_location_place()),
Self::update_row(&self.originally_created, metadata.originally_created()),
Self::update_row(&self.user_comment, metadata.exif.user_comment()),
Self::update_row(&self.aperture, metadata.f_number()),
Self::update_row(&self.exposure, metadata.exposure_time()),
Self::update_row(&self.iso, metadata.iso()),

View file

@ -154,6 +154,16 @@
</style>
</object>
</child>
<child>
<object class="AdwActionRow" id="user_comment">
<property name="title" translatable="yes">Comment</property>
<property name="subtitle-selectable">True</property>
<property name="use-markup">False</property>
<style>
<class name="property" />
</style>
</object>
</child>
<child>
<object class="AdwActionRow" id="aperture">
<property name="title" translatable="yes">Aperture</property>