- **Reapply "Remove cx from ThemeSettings (#38836)" (#39691)** - **Fix theme loading races** Closes #ISSUE Release Notes: - N/A
20 lines
506 B
Rust
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(),
|
|
}
|
|
}
|
|
}
|