image_viewer_settings.rs
1pub use settings::ImageFileSizeUnit;
2use settings::Settings;
3
4/// The settings for the image viewer.
5#[derive(Clone, Debug, Default)]
6pub struct ImageViewerSettings {
7 /// The unit to use for displaying image file sizes.
8 ///
9 /// Default: "binary"
10 pub unit: ImageFileSizeUnit,
11}
12
13impl Settings for ImageViewerSettings {
14 fn from_settings(content: &settings::SettingsContent) -> Self {
15 Self {
16 unit: content.image_viewer.clone().unwrap().unit.unwrap(),
17 }
18 }
19}