title_bar: Remove dependency on theme_selector (#21009)

This PR removes the `title_bar` crate's dependency on the
`theme_selector`.

The `theme_selector::Toggle` action now resides at
`zed_actions::theme_selector::Toggle`.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-11-21 14:33:58 -05:00 committed by GitHub
parent f62ccf9c8a
commit 6b2f1cc543
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 31 additions and 16 deletions

View file

@ -25,5 +25,6 @@ theme.workspace = true
ui.workspace = true
util.workspace = true
workspace.workspace = true
zed_actions.workspace = true
[dev-dependencies]

View file

@ -2,25 +2,18 @@ use client::telemetry::Telemetry;
use fs::Fs;
use fuzzy::{match_strings, StringMatch, StringMatchCandidate};
use gpui::{
actions, impl_actions, AppContext, DismissEvent, EventEmitter, FocusableView, Render,
UpdateGlobal, View, ViewContext, VisualContext, WeakView,
actions, AppContext, DismissEvent, EventEmitter, FocusableView, Render, UpdateGlobal, View,
ViewContext, VisualContext, WeakView,
};
use picker::{Picker, PickerDelegate};
use serde::Deserialize;
use settings::{update_settings_file, SettingsStore};
use std::sync::Arc;
use theme::{Appearance, Theme, ThemeMeta, ThemeRegistry, ThemeSettings};
use ui::{prelude::*, v_flex, ListItem, ListItemSpacing};
use util::ResultExt;
use workspace::{ui::HighlightedLabel, ModalView, Workspace};
use zed_actions::theme_selector::Toggle;
#[derive(PartialEq, Clone, Default, Debug, Deserialize)]
pub struct Toggle {
/// A list of theme names to filter the theme selector down to.
pub themes_filter: Option<Vec<String>>,
}
impl_actions!(theme_selector, [Toggle]);
actions!(theme_selector, [Reload]);
pub fn init(cx: &mut AppContext) {