add avatar
This commit is contained in:
@@ -4,6 +4,7 @@ use gpui::{
|
||||
ParentElement as _, Render, SharedString, StatefulInteractiveElement as _, Styled as _, Window,
|
||||
WindowBounds, WindowOptions, div, px, size,
|
||||
};
|
||||
use gpui_native_core::avatar::Avatar;
|
||||
use gpui_native_core::button::{Button, ButtonVariant};
|
||||
use gpui_native_core::checkbox::Checkbox;
|
||||
use gpui_native_core::common::{h_flex, v_flex};
|
||||
@@ -409,6 +410,32 @@ impl Render for Gallery {
|
||||
.accessibility_label("Working"),
|
||||
),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.flex()
|
||||
.flex_col()
|
||||
.gap_2()
|
||||
.child(section_label(
|
||||
"avatar · native refs — NSImage (contact), WinUI PersonPicture, Adwaita Avatar, Breeze",
|
||||
colors,
|
||||
))
|
||||
.child(
|
||||
h_flex()
|
||||
.gap_3()
|
||||
.child(
|
||||
Avatar::new("reya@reya.info")
|
||||
.name("Reya Adele")
|
||||
.picture(Some("https://github.com/reya.png")),
|
||||
)
|
||||
.child(
|
||||
Avatar::new("ada@reya.info")
|
||||
.name("Ada Lovelace")
|
||||
.picture(Some("https://example.com/missing.png")),
|
||||
)
|
||||
.child(Avatar::new("grace@reya.info").name("Grace Hopper"))
|
||||
.child(Avatar::new("bot@reya.info")),
|
||||
),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.flex()
|
||||
|
||||
Reference in New Issue
Block a user