Extract theme_selector
into its own crate
This commit is contained in:
parent
47b29a5f21
commit
2280c75103
6 changed files with 63 additions and 22 deletions
|
@ -3,7 +3,6 @@ pub mod language;
|
|||
pub mod menus;
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub mod test;
|
||||
pub mod theme_selector;
|
||||
|
||||
pub use buffer;
|
||||
use buffer::LanguageRegistry;
|
||||
|
@ -25,6 +24,7 @@ pub use project::{self, fs};
|
|||
use project_panel::ProjectPanel;
|
||||
use std::{path::PathBuf, sync::Arc};
|
||||
use theme::ThemeRegistry;
|
||||
use theme_selector::ThemeSelectorParams;
|
||||
pub use workspace;
|
||||
use workspace::{Settings, Workspace, WorkspaceParams};
|
||||
|
||||
|
@ -188,6 +188,16 @@ impl<'a> From<&'a AppState> for WorkspaceParams {
|
|||
}
|
||||
}
|
||||
|
||||
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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue