mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-24 03:24:21 +01:00
pfp: remove border except for profile
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -398,11 +398,7 @@ impl<'a> NavTitle<'a> {
|
||||
.as_ref()
|
||||
.ok()
|
||||
.and_then(move |p| {
|
||||
Some(
|
||||
ui::ProfilePic::from_profile(self.img_cache, p)?
|
||||
.size(pfp_size)
|
||||
.border(2.0),
|
||||
)
|
||||
Some(ui::ProfilePic::from_profile(self.img_cache, p)?.size(pfp_size))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -228,12 +228,7 @@ impl<'a> NoteView<'a> {
|
||||
anim_speed,
|
||||
);
|
||||
|
||||
ui.put(
|
||||
rect,
|
||||
ui::ProfilePic::new(self.img_cache, pic)
|
||||
.size(size)
|
||||
.border(2.0),
|
||||
)
|
||||
ui.put(rect, ui::ProfilePic::new(self.img_cache, pic).size(size))
|
||||
.on_hover_ui_at_pointer(|ui| {
|
||||
ui.set_max_width(300.0);
|
||||
ui.add(ui::ProfilePreview::new(
|
||||
@@ -251,8 +246,7 @@ impl<'a> NoteView<'a> {
|
||||
None => ui
|
||||
.add(
|
||||
ui::ProfilePic::new(self.img_cache, ui::ProfilePic::no_pfp_url())
|
||||
.size(pfp_size)
|
||||
.border(2.0),
|
||||
.size(pfp_size),
|
||||
)
|
||||
.interact(sense),
|
||||
}
|
||||
|
||||
@@ -113,21 +113,13 @@ impl<'a> PostView<'a> {
|
||||
.get_profile_by_pubkey(txn, self.poster.pubkey.bytes())
|
||||
.as_ref()
|
||||
.ok()
|
||||
.and_then(|p| {
|
||||
Some(
|
||||
ui::ProfilePic::from_profile(self.img_cache, p)?
|
||||
.size(pfp_size)
|
||||
.border(2.0),
|
||||
)
|
||||
});
|
||||
.and_then(|p| Some(ui::ProfilePic::from_profile(self.img_cache, p)?.size(pfp_size)));
|
||||
|
||||
if let Some(pfp) = poster_pfp {
|
||||
ui.add(pfp);
|
||||
} else {
|
||||
ui.add(
|
||||
ui::ProfilePic::new(self.img_cache, ui::ProfilePic::no_pfp_url())
|
||||
.size(pfp_size)
|
||||
.border(2.0),
|
||||
ui::ProfilePic::new(self.img_cache, ui::ProfilePic::no_pfp_url()).size(pfp_size),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,11 +91,7 @@ impl egui::Widget for SimpleProfilePreview<'_, '_> {
|
||||
fn ui(self, ui: &mut egui::Ui) -> egui::Response {
|
||||
Frame::none()
|
||||
.show(ui, |ui| {
|
||||
ui.add(
|
||||
ProfilePic::new(self.cache, get_profile_url(self.profile))
|
||||
.size(48.0)
|
||||
.border(2.0),
|
||||
);
|
||||
ui.add(ProfilePic::new(self.cache, get_profile_url(self.profile)).size(48.0));
|
||||
ui.vertical(|ui| {
|
||||
ui.add(display_name_widget(get_display_name(self.profile), true));
|
||||
if !self.is_nsec {
|
||||
|
||||
@@ -266,9 +266,7 @@ impl<'a> DesktopSidePanel<'a> {
|
||||
let txn = nostrdb::Transaction::new(self.ndb).expect("should be able to create txn");
|
||||
let profile_url = get_account_url(&txn, self.ndb, self.selected_account);
|
||||
|
||||
let widget = ProfilePic::new(self.img_cache, profile_url)
|
||||
.size(cur_pfp_size)
|
||||
.border(2.0);
|
||||
let widget = ProfilePic::new(self.img_cache, profile_url).size(cur_pfp_size);
|
||||
|
||||
ui.put(helper.get_animation_rect(), widget);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user