slidingView: Use stacked cards animation for steps
Use an animation with less motion for navigation through images with arrow keys and buttons. For skipping multiple images and for using the touchpad, the animations stay the same. Closes #245
This commit is contained in:
parent
67339cf2da
commit
784c53b318
2 changed files with 234 additions and 43 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2020-2023 Christopher Davis
|
||||
// Copyright (c) 2022-2023 Sophie Herold
|
||||
// Copyright (c) 2022-2024 Sophie Herold
|
||||
// Copyright (c) 2022 Maximiliano Sandoval R
|
||||
// Copyright (c) 2023 Julian Hofer
|
||||
// Copyright (c) 2023 Starccy
|
||||
|
|
@ -412,7 +412,7 @@ impl LpImageView {
|
|||
|
||||
log::debug!("Scrolling to page for {}", new_file.uri());
|
||||
self.imp().preserve_content.set(true);
|
||||
sliding_view.scroll_to(&page);
|
||||
sliding_view.animate_to(&page);
|
||||
}
|
||||
|
||||
/// Ensures the sliding view contains the correct images
|
||||
|
|
@ -457,7 +457,7 @@ impl LpImageView {
|
|||
return;
|
||||
};
|
||||
|
||||
self.sliding_view().scroll_to(¤t_page);
|
||||
self.sliding_view().animate_to(¤t_page);
|
||||
}
|
||||
|
||||
fn sliding_view(&self) -> LpSlidingView {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue