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