notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 95affa224529107a91c1535de9a4db151b03d84a
parent 94e31ff715bb9299a6d3e915c439e00975de9d5c
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 27 Feb 2025 10:37:07 -0800

ui: fix bounciness when loading pfps

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mcrates/notedeck_columns/src/ui/note/mod.rs | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/crates/notedeck_columns/src/ui/note/mod.rs b/crates/notedeck_columns/src/ui/note/mod.rs @@ -242,12 +242,19 @@ impl<'a> NoteView<'a> { resp } - None => ui - .add( + None => { + // 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()) .size(pfp_size), ) - .interact(sense), + .interact(sense) + } } }