Restore the colored background for collaborators that you're following
This commit is contained in:
parent
2443ee6faf
commit
4b92a15ab3
3 changed files with 84 additions and 65 deletions
|
@ -1,13 +1,13 @@
|
|||
use gpui::{div, AnyElement, IntoElement, ParentElement, RenderOnce, Styled, WindowContext};
|
||||
use gpui::{div, AnyElement, Div, IntoElement, ParentElement, Styled};
|
||||
use smallvec::SmallVec;
|
||||
|
||||
#[derive(Default, IntoElement)]
|
||||
#[derive(Default)]
|
||||
pub struct FacePile {
|
||||
pub faces: SmallVec<[AnyElement; 2]>,
|
||||
}
|
||||
|
||||
impl RenderOnce for FacePile {
|
||||
fn render(self, _: &mut WindowContext) -> impl IntoElement {
|
||||
impl FacePile {
|
||||
pub fn render(self) -> Div {
|
||||
let player_count = self.faces.len();
|
||||
let player_list = self.faces.into_iter().enumerate().map(|(ix, player)| {
|
||||
let isnt_last = ix < player_count - 1;
|
||||
|
@ -17,7 +17,7 @@ impl RenderOnce for FacePile {
|
|||
.when(isnt_last, |div| div.neg_mr_1())
|
||||
.child(player)
|
||||
});
|
||||
div().p_1().flex().items_center().children(player_list)
|
||||
div().flex().items_center().children(player_list)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue