Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Use `ghost_element_background` for avatar background color

Kirill Bulatov1c13c3a24357
diff --git a/crates/theme2/src/styles/colors.rs b/crates/theme2/src/styles/colors.rs
index ff7163ccdc1..0b548c5a743 100644
--- a/crates/theme2/src/styles/colors.rs
+++ b/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,
// ===
diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs
index 7b60802e751..fc6253d0103 100644
--- a/crates/theme2/src/theme2.rs
+++ b/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
diff --git a/crates/ui2/src/components/avatar.rs b/crates/ui2/src/components/avatar.rs
index 0ab6ce2d85b..793872cd8ab 100644
--- a/crates/ui2/src/components/avatar.rs
+++ b/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.