Merge branch 'master' into feature/time-travel
This commit is contained in:
commit
4334923add
35 changed files with 583 additions and 171 deletions
|
|
@ -14,8 +14,8 @@ use iced::widget::{
|
|||
};
|
||||
use iced::window;
|
||||
use iced::{
|
||||
Animation, ContentFit, Element, Fill, Function, Subscription, Task, Theme,
|
||||
color,
|
||||
Animation, Color, ContentFit, Element, Fill, Function, Shadow,
|
||||
Subscription, Task, Theme, color,
|
||||
};
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
|
@ -210,6 +210,22 @@ fn card<'a>(
|
|||
.content_fit(ContentFit::Cover)
|
||||
.opacity(thumbnail.fade_in.interpolate(0.0, 1.0, now))
|
||||
.scale(thumbnail.zoom.interpolate(1.0, 1.1, now))
|
||||
.translate(move |bounds, viewport| {
|
||||
bounds.zoom(1.1).offset(&viewport.shrink(10))
|
||||
* thumbnail.zoom.interpolate(0.0, 1.0, now)
|
||||
})
|
||||
.style(move |_theme| image::Style {
|
||||
shadow: Shadow {
|
||||
color: Color::BLACK.scale_alpha(
|
||||
thumbnail.zoom.interpolate(0.0, 1.0, now),
|
||||
),
|
||||
blur_radius: thumbnail
|
||||
.zoom
|
||||
.interpolate(0.0, 20.0, now),
|
||||
..Shadow::default()
|
||||
},
|
||||
..image::Style::default()
|
||||
})
|
||||
.into()
|
||||
} else {
|
||||
horizontal_space().into()
|
||||
|
|
|
|||
|
|
@ -425,6 +425,7 @@ mod toast {
|
|||
state: &'b mut Tree,
|
||||
layout: Layout<'_>,
|
||||
renderer: &Renderer,
|
||||
viewport: &Rectangle,
|
||||
translation: Vector,
|
||||
) -> Option<overlay::Element<'b, Message, Theme, Renderer>> {
|
||||
let instants = state.state.downcast_mut::<Vec<Option<Instant>>>();
|
||||
|
|
@ -435,6 +436,7 @@ mod toast {
|
|||
&mut content_state[0],
|
||||
layout,
|
||||
renderer,
|
||||
viewport,
|
||||
translation,
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue