Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
use gpui::Pixels;
use settings::{IntoGpui, RegisterSetting, Settings};
use workspace::dock::DockPosition;
#[derive(Debug, RegisterSetting)]
pub struct CollaborationPanelSettings {
pub button: bool,
pub dock: DockPosition,
pub default_width: Pixels,
}
impl Settings for CollaborationPanelSettings {
fn from_settings(content: &settings::SettingsContent) -> Self {
let panel = content.collaboration_panel.as_ref().unwrap();
Self {
button: panel.button.unwrap(),
dock: panel.dock.unwrap().into(),
default_width: panel.default_width.unwrap().into_gpui(),
}
}
}