ui: add banners to profile previews

profile previews still need lots of work, but this was a challenge to
get an aspectRatio: fill mechanism for images which the banner takes
advantage of.

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-04-21 15:00:25 -07:00
parent 2f6f92e62c
commit 2edba9942c
2 changed files with 67 additions and 9 deletions

View File

@@ -139,6 +139,7 @@ fn render_note_contents(
if let Some(rec) = profile.as_ref() {
resp.on_hover_ui_at_pointer(|ui| {
egui::Frame::default().show(ui, |ui| {
ui.set_max_width(300.0);
ui.add(ui::ProfilePreview::new(rec));
});
});