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

@ -67,7 +67,7 @@ impl View for FileFinder {
}
fn render(&mut self, cx: &mut RenderContext<Self>) -> ElementBox {
let settings = cx.app_state::<Settings>();
let settings = cx.global::<Settings>();
Align::new(
ConstrainedBox::new(
Container::new(
@ -106,7 +106,7 @@ impl View for FileFinder {
impl FileFinder {
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(),
@ -142,7 +142,7 @@ impl FileFinder {
fn render_match(&self, path_match: &PathMatch, index: usize, cx: &AppContext) -> ElementBox {
let selected_index = self.selected_index();
let settings = cx.app_state::<Settings>();
let settings = cx.global::<Settings>();
let style = if index == selected_index {
&settings.theme.selector.active_item
} else {