mirror of
https://github.com/damus-io/notedeck.git
synced 2024-09-18 21:03:31 +00:00
img: remove loading spinners
This adds blank space, but it will be nice if we can improve this by either fading in or having some shimmer effect. Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
8602650278
commit
772bfbad5f
@ -196,6 +196,7 @@ pub fn create_themed_visuals(theme: ColorTheme, default: Visuals) -> Visuals {
|
||||
width: 1.0,
|
||||
color: theme.window_stroke_color,
|
||||
},
|
||||
image_loading_spinners: false,
|
||||
..default
|
||||
}
|
||||
}
|
||||
|
@ -233,7 +233,8 @@ fn image_carousel(
|
||||
match img_cache.map()[&image].ready() {
|
||||
// Still waiting
|
||||
None => {
|
||||
ui.add(egui::Spinner::new().size(spinsz));
|
||||
ui.allocate_space(egui::vec2(spinsz, spinsz));
|
||||
//ui.add(egui::Spinner::new().size(spinsz));
|
||||
}
|
||||
// Failed to fetch image!
|
||||
Some(Err(_err)) => {
|
||||
@ -246,7 +247,8 @@ fn image_carousel(
|
||||
);
|
||||
img_cache.map_mut().insert(image.to_owned(), no_pfp);
|
||||
// spin until next pass
|
||||
ui.add(egui::Spinner::new().size(spinsz));
|
||||
ui.allocate_space(egui::vec2(spinsz, spinsz));
|
||||
//ui.add(egui::Spinner::new().size(spinsz));
|
||||
}
|
||||
// Use the previously resolved image
|
||||
Some(Ok(img)) => {
|
||||
|
@ -78,7 +78,7 @@ fn render_pfp(
|
||||
}
|
||||
|
||||
match img_cache.map()[url].ready() {
|
||||
None => ui.add(egui::Spinner::new().size(ui_size)),
|
||||
None => paint_circle(ui, ui_size),
|
||||
|
||||
// Failed to fetch profile!
|
||||
Some(Err(_err)) => {
|
||||
|
Loading…
Reference in New Issue
Block a user