Rename app_state to global in gpui

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-03-17 14:33:01 +01:00
parent 84bacc556f
commit 44d997c00c
24 changed files with 91 additions and 89 deletions

View file

@ -69,7 +69,7 @@ impl View for ProjectSymbolsView {
}
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
let settings = cx.app_state::<Settings>();
let settings = cx.global::<Settings>();
Flex::new(Axis::Vertical)
.with_child(
Container::new(ChildView::new(&self.query_editor).boxed())
@ -233,7 +233,7 @@ impl ProjectSymbolsView {
fn render_matches(&self, cx: &AppContext) -> ElementBox {
if self.matches.is_empty() {
let settings = cx.app_state::<Settings>();
let settings = cx.global::<Settings>();
return Container::new(
Label::new(
"No matches".into(),
@ -276,7 +276,7 @@ impl ProjectSymbolsView {
show_worktree_root_name: bool,
cx: &AppContext,
) -> ElementBox {
let settings = cx.app_state::<Settings>();
let settings = cx.global::<Settings>();
let style = if index == self.selected_match_index {
&settings.theme.selector.active_item
} else {