Make Overlay aware of viewport
... and unify `Image::float` and `Image::translate`
This commit is contained in:
parent
a2a7c18c9d
commit
6c51a9579d
29 changed files with 121 additions and 56 deletions
|
|
@ -212,11 +212,9 @@ fn card<'a>(
|
|||
.scale(thumbnail.zoom.interpolate(1.0, 1.1, now))
|
||||
.translate(move |bounds, viewport| {
|
||||
let final_bounds = bounds.zoom(1.1);
|
||||
|
||||
final_bounds.offset(&viewport.shrink(10))
|
||||
* thumbnail.zoom.interpolate(0.0, 1.0, now)
|
||||
})
|
||||
.float(true)
|
||||
.style(move |_theme| image::Style {
|
||||
shadow: Shadow {
|
||||
color: Color::BLACK.scale_alpha(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue