Files
oak-gpui/crates/image_viewer/src/image_viewer_settings.rs
T
Conrad Irwin 1d1c799b4b Reland "Remove cx from ThemeSettings" (#39720)
- **Reapply "Remove cx from ThemeSettings (#38836)" (#39691)**
- **Fix theme loading races**

Closes #ISSUE

Release Notes:

- N/A
2025-10-08 17:36:52 +02:00

20 lines
506 B
Rust

pub use settings::ImageFileSizeUnit;
use settings::Settings;
/// The settings for the image viewer.
#[derive(Clone, Debug, Default)]
pub struct ImageViewerSettings {
/// The unit to use for displaying image file sizes.
///
/// Default: "binary"
pub unit: ImageFileSizeUnit,
}
impl Settings for ImageViewerSettings {
fn from_settings(content: &settings::SettingsContent) -> Self {
Self {
unit: content.image_viewer.clone().unwrap().unit.unwrap(),
}
}
}