ui: fix bounciness when loading pfps
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -242,12 +242,19 @@ impl<'a> NoteView<'a> {
|
|||||||
|
|
||||||
resp
|
resp
|
||||||
}
|
}
|
||||||
None => ui
|
None => {
|
||||||
.add(
|
// This has to match the expand size from the above case to
|
||||||
|
// prevent bounciness
|
||||||
|
let size = pfp_size + ui::NoteView::expand_size();
|
||||||
|
let (rect, _response) = ui.allocate_exact_size(egui::vec2(size, size), sense);
|
||||||
|
|
||||||
|
ui.put(
|
||||||
|
rect,
|
||||||
ui::ProfilePic::new(self.img_cache, ui::ProfilePic::no_pfp_url())
|
ui::ProfilePic::new(self.img_cache, ui::ProfilePic::no_pfp_url())
|
||||||
.size(pfp_size),
|
.size(pfp_size),
|
||||||
)
|
)
|
||||||
.interact(sense),
|
.interact(sense)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user