Increase blurhash fade in duration and adjust easing in gallery example
This commit is contained in:
parent
80ccbb8357
commit
e0d60d5839
1 changed files with 5 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ mod civitai;
|
||||||
use crate::civitai::{Error, Id, Image, Rgba, Size};
|
use crate::civitai::{Error, Id, Image, Rgba, Size};
|
||||||
|
|
||||||
use iced::animation;
|
use iced::animation;
|
||||||
use iced::time::Instant;
|
use iced::time::{milliseconds, Instant};
|
||||||
use iced::widget::{
|
use iced::widget::{
|
||||||
button, center_x, container, horizontal_space, image, mouse_area, opaque,
|
button, center_x, container, horizontal_space, image, mouse_area, opaque,
|
||||||
pop, row, scrollable, stack,
|
pop, row, scrollable, stack,
|
||||||
|
|
@ -290,7 +290,10 @@ impl Preview {
|
||||||
fn loading(rgba: Rgba) -> Self {
|
fn loading(rgba: Rgba) -> Self {
|
||||||
Self::Loading {
|
Self::Loading {
|
||||||
blurhash: Blurhash {
|
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(
|
handle: image::Handle::from_rgba(
|
||||||
rgba.width,
|
rgba.width,
|
||||||
rgba.height,
|
rgba.height,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue