Increase blurhash fade in duration and adjust easing in gallery example

This commit is contained in:
Héctor Ramón Jiménez 2025-02-09 08:28:29 +01:00
parent 80ccbb8357
commit e0d60d5839
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -7,7 +7,7 @@ mod civitai;
use crate::civitai::{Error, Id, Image, Rgba, Size};
use iced::animation;
use iced::time::Instant;
use iced::time::{milliseconds, Instant};
use iced::widget::{
button, center_x, container, horizontal_space, image, mouse_area, opaque,
pop, row, scrollable, stack,
@ -290,7 +290,10 @@ impl Preview {
fn loading(rgba: Rgba) -> Self {
Self::Loading {
blurhash: Blurhash {
fade_in: Animation::new(false).slow().go(true),
fade_in: Animation::new(false)
.duration(milliseconds(700))
.easing(animation::Easing::EaseIn)
.go(true),
handle: image::Handle::from_rgba(
rgba.width,
rgba.height,