feat: show facepill on tabpanel

This commit is contained in:
2025-01-16 08:49:24 +07:00
parent 161e6a5342
commit b119722392
9 changed files with 59 additions and 2051 deletions

View File

@@ -35,7 +35,7 @@ impl RenderOnce for Message {
.border_l_2()
.border_color(cx.theme().background)
.hover(|this| {
this.bg(cx.theme().accent.step(cx, ColorScaleStep::TWO))
this.bg(cx.theme().accent.step(cx, ColorScaleStep::ONE))
.border_color(cx.theme().accent.step(cx, ColorScaleStep::NINE))
})
.child(

View File

@@ -386,8 +386,15 @@ impl Panel for ChatPanel {
self.id.clone()
}
fn panel_metadata(&self) -> Option<Metadata> {
None
fn panel_facepile(&self, cx: &WindowContext) -> Option<Vec<String>> {
Some(
self.room
.read(cx)
.members
.iter()
.map(|member| member.avatar())
.collect(),
)
}
fn title(&self, _cx: &WindowContext) -> AnyElement {