From e0d60d58391535d96f0864da4a4dde50d5669543 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 9 Feb 2025 08:28:29 +0100 Subject: Increase blurhash fade in duration and adjust easing in `gallery` example --- examples/gallery/src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/gallery/src/main.rs b/examples/gallery/src/main.rs index 4728129e..ab22679d 100644 --- a/examples/gallery/src/main.rs +++ b/examples/gallery/src/main.rs @@ -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, -- cgit