Files
oak-gpui/crates/image_viewer/src/image_viewer_settings.rs
T
Conrad Irwin 41cf114d8a Revert "Remove cx from ThemeSettings (#38836)" (#39691)
This reverts commit a2a7bd139a.

This caused themes to not load correctly on startup, you needed to edit
your settings.

Release Notes:

- N/A
2025-10-07 15:45:20 +00:00

21 lines
536 B
Rust

use gpui::App;
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, _cx: &mut App) -> Self {
Self {
unit: content.image_viewer.clone().unwrap().unit.unwrap(),
}
}
}