Rename fields in ThemeColors (#3242)

This PR applies a number of field renames in the `ThemeColors` struct
from the `import-theme` branch.

This will help prevent this branch from diverging too far from `main`.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
This commit is contained in:
Marshall Bowers 2023-11-06 17:53:27 +01:00 committed by GitHub
parent 8bcf114a05
commit bf80c1da5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 144 additions and 82 deletions

View file

@ -220,7 +220,7 @@ impl Buffer {
.flex_1()
.w_full()
.h_full()
.bg(cx.theme().colors().editor)
.bg(cx.theme().colors().editor_background)
.children(rows)
}
}

View file

@ -30,14 +30,17 @@ impl Render for BufferSearch {
type Element = Div<Self>;
fn render(&mut self, cx: &mut ViewContext<Self>) -> Div<Self> {
h_stack().bg(cx.theme().colors().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))
.on_click(|buffer_search, cx| {
buffer_search.toggle_replace(cx);
}),
),
)
h_stack()
.bg(cx.theme().colors().toolbar_background)
.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))
.on_click(|buffer_search, cx| {
buffer_search.toggle_replace(cx);
}),
),
)
}
}

View file

@ -17,7 +17,7 @@ impl CollabPanel {
v_stack()
.id(self.id.clone())
.h_full()
.bg(cx.theme().colors().surface)
.bg(cx.theme().colors().surface_background)
.child(
v_stack()
.id("crdb")

View file

@ -24,7 +24,7 @@ impl MultiBuffer {
.items_center()
.justify_between()
.p_4()
.bg(cx.theme().colors().editor_subheader)
.bg(cx.theme().colors().editor_subheader_background)
.child(Label::new("main.rs"))
.child(IconButton::new("arrow_up_right", Icon::ArrowUpRight)),
)

View file

@ -22,7 +22,7 @@ impl NotificationsPanel {
.flex()
.flex_col()
.size_full()
.bg(cx.theme().colors().surface)
.bg(cx.theme().colors().surface_background)
.child(
ListHeader::new("Notifications").meta(Some(ListHeaderMeta::Tools(vec![
Icon::AtSign,
@ -43,7 +43,7 @@ impl NotificationsPanel {
.p_1()
// TODO: Add cursor style
// .cursor(Cursor::IBeam)
.bg(cx.theme().colors().element)
.bg(cx.theme().colors().element_background)
.border()
.border_color(cx.theme().colors().border_variant)
.child(

View file

@ -113,7 +113,7 @@ impl<V: 'static> PaneGroup<V> {
.gap_px()
.w_full()
.h_full()
.bg(cx.theme().colors().editor)
.bg(cx.theme().colors().editor_background)
.children(self.groups.into_iter().map(|group| group.render(view, cx)));
if self.split_direction == SplitDirection::Horizontal {

View file

@ -19,7 +19,7 @@ impl ProjectPanel {
.flex()
.flex_col()
.size_full()
.bg(cx.theme().colors().surface)
.bg(cx.theme().colors().surface_background)
.child(
div()
.id("project-panel-contents")

View file

@ -93,7 +93,7 @@ impl StatusBar {
.items_center()
.justify_between()
.w_full()
.bg(cx.theme().colors().status_bar)
.bg(cx.theme().colors().status_bar_background)
.child(self.left_tools(view, cx))
.child(self.right_tools(view, cx))
}

View file

@ -31,7 +31,7 @@ impl TabBar {
.id(self.id.clone())
.w_full()
.flex()
.bg(cx.theme().colors().tab_bar)
.bg(cx.theme().colors().tab_bar_background)
// Left Side
.child(
div()

View file

@ -24,7 +24,7 @@ impl Terminal {
div()
.w_full()
.flex()
.bg(cx.theme().colors().surface)
.bg(cx.theme().colors().surface_background)
.child(
div().px_1().flex().flex_none().gap_2().child(
div()

View file

@ -56,7 +56,7 @@ impl<V: 'static> Toolbar<V> {
fn render(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {
div()
.bg(cx.theme().colors().toolbar)
.bg(cx.theme().colors().toolbar_background)
.p_2()
.flex()
.justify_between()

View file

@ -28,7 +28,7 @@ impl TrafficLight {
(true, TrafficLightColor::Red) => system_colors.mac_os_traffic_light_red,
(true, TrafficLightColor::Yellow) => system_colors.mac_os_traffic_light_yellow,
(true, TrafficLightColor::Green) => system_colors.mac_os_traffic_light_green,
(false, _) => cx.theme().colors().element,
(false, _) => cx.theme().colors().element_background,
};
div().w_3().h_3().rounded_full().bg(fill)