diff options
| author | 2025-02-09 08:28:29 +0100 | |
|---|---|---|
| committer | 2025-02-09 08:28:29 +0100 | |
| commit | e0d60d58391535d96f0864da4a4dde50d5669543 (patch) | |
| tree | 97f0777f235b63c5a9aa7e81fcef8bfbdade3328 /examples | |
| parent | 80ccbb835774cbd462076b35464514682d13459e (diff) | |
| download | iced-e0d60d58391535d96f0864da4a4dde50d5669543.tar.gz iced-e0d60d58391535d96f0864da4a4dde50d5669543.tar.bz2 iced-e0d60d58391535d96f0864da4a4dde50d5669543.zip  | |
Increase blurhash fade in duration and adjust easing in `gallery` example
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/gallery/src/main.rs | 7 | 
1 files 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,  | 
