Remove ThemeColor
in favor of theme2::Theme
This commit is contained in:
parent
bb3f59252e
commit
e1032c5341
42 changed files with 225 additions and 391 deletions
|
@ -22,15 +22,13 @@ impl BufferSearch {
|
|||
}
|
||||
|
||||
pub fn view(cx: &mut WindowContext) -> View<Self> {
|
||||
let color = ThemeColor::new(cx);
|
||||
|
||||
view(cx.entity(|cx| Self::new()), Self::render)
|
||||
}
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element<ViewState = Self> {
|
||||
let color = ThemeColor::new(cx);
|
||||
let theme = theme(cx);
|
||||
|
||||
h_stack().bg(color.toolbar).p_2().child(
|
||||
h_stack().bg(theme.toolbar).p_2().child(
|
||||
h_stack().child(Input::new("Search")).child(
|
||||
IconButton::<Self>::new("replace", Icon::Replace)
|
||||
.when(self.is_replace_open, |this| this.color(IconColor::Accent))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue