Use `ghost_element_background` for avatar background color (#3819)

Kirill Bulatov created

Also add a couple todo!()s on top of the comments

Release Notes:

- N/A

Change summary

crates/theme2/src/styles/colors.rs  | 1 +
crates/theme2/src/theme2.rs         | 1 +
crates/ui2/src/components/avatar.rs | 3 +--
3 files changed, 3 insertions(+), 2 deletions(-)

Detailed changes

crates/theme2/src/styles/colors.rs 🔗

@@ -129,6 +129,7 @@ pub struct ThemeColors {
     /// The border color of the scrollbar track.
     pub scrollbar_track_border: Hsla,
     // /// The opacity of the scrollbar status marks, like diagnostic states and git status.
+    // todo!()
     // pub scrollbar_status_opacity: Hsla,
 
     // ===

crates/theme2/src/theme2.rs 🔗

@@ -73,6 +73,7 @@ impl ActiveTheme for AppContext {
     }
 }
 
+// todo!()
 // impl<'a> ActiveTheme for WindowContext<'a> {
 //     fn theme(&self) -> &Arc<Theme> {
 //         &ThemeSettings::get_global(self.app()).active_theme

crates/ui2/src/components/avatar.rs 🔗

@@ -37,8 +37,7 @@ impl RenderOnce for Avatar {
             .child(
                 self.image
                     .size(size)
-                    // todo!(Pull the avatar fallback background from the theme.)
-                    .bg(gpui::red()),
+                    .bg(cx.theme().colors().ghost_element_background),
             )
             .children(self.is_available.map(|is_free| {
                 // HACK: non-integer sizes result in oval indicators.