diff --git a/src/people.rs b/src/people.rs index 03c7d907..1339f9a7 100644 --- a/src/people.rs +++ b/src/people.rs @@ -5,6 +5,7 @@ use crate::AVATAR_SIZE; use dashmap::{DashMap, DashSet}; use eframe::egui::ColorImage; use egui_extras::image::FitTo; +use image::imageops::FilterType; use nostr_types::{Metadata, PublicKeyHex, Unixtime, Url}; use std::cmp::Ordering; use std::time::Duration; @@ -310,7 +311,7 @@ impl People { // Finish this later (spawn) let apubkeyhex = pubkeyhex.to_owned(); tokio::spawn(async move { - let size = AVATAR_SIZE + let size = AVATAR_SIZE * 3 // 3x feed size, 1x people page size * GLOBALS .pixels_per_point_times_100 .load(std::sync::atomic::Ordering::Relaxed) @@ -319,7 +320,7 @@ impl People { // Note: we can't use egui_extras::image::load_image_bytes because we // need to force a resize let image = - image.resize(size, size, image::imageops::FilterType::CatmullRom); // DynamicImage + image.resize(size, size, FilterType::CatmullRom); // DynamicImage let image_buffer = image.into_rgba8(); // RgbaImage (ImageBuffer) let color_image = ColorImage::from_rgba_unmultiplied( [ diff --git a/src/ui/people/person.rs b/src/ui/people/person.rs index df03e557..84cff63f 100644 --- a/src/ui/people/person.rs +++ b/src/ui/people/person.rs @@ -3,6 +3,7 @@ use crate::comms::ToOverlordMessage; use crate::db::DbPerson; use crate::feed::FeedKind; use crate::globals::GLOBALS; +use crate::AVATAR_SIZE_F32; use eframe::egui; use egui::{Context, RichText, Ui, Vec2}; @@ -33,7 +34,7 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, _frame: &mut eframe::Fra } else { app.placeholder_avatar.clone() }; - ui.image(&avatar, Vec2 { x: 36.0, y: 36.0 }); + ui.image(&avatar, Vec2 { x: AVATAR_SIZE_F32 * 3.0, y: AVATAR_SIZE_F32 * 3.0 }); ui.vertical(|ui| { ui.label(RichText::new(GossipUi::hex_pubkey_short(&pubkeyhex)).weak()); GossipUi::render_person_name_line(ui, maybe_person.as_ref());