Merge branch 'main' into share-project

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2021-12-20 11:42:59 -08:00
commit 466a377e1d
16 changed files with 423 additions and 306 deletions

View file

@ -11,7 +11,7 @@ use parking_lot::Mutex;
use postage::watch;
use std::{cmp, sync::Arc};
use theme::ThemeRegistry;
use workspace::{Settings, Workspace};
use workspace::{Settings, Workspace, AppState};
#[derive(Clone)]
pub struct ThemeSelectorParams {
@ -317,3 +317,13 @@ impl View for ThemeSelector {
cx
}
}
impl<'a> From<&'a AppState> for ThemeSelectorParams {
fn from(state: &'a AppState) -> Self {
Self {
settings_tx: state.settings_tx.clone(),
settings: state.settings.clone(),
themes: state.themes.clone(),
}
}
}