image: Add zoom and scrolling support

Zoom via
- Scroll event controller
- Zoom gesture
- Overlay buttons
- Fixed zoom level shortcuts (1=100%, 2=200%)
Scrolling via
- Scrolled window
- Drag gesture
Changes
- Implement best-fit via calculating a zoom level
- Gesture for carousel no longer working because of scrolled window
- Split control overlays into two to not steal inputs in area between

Closes #17
This commit is contained in:
Sophie Herold 2022-11-10 19:39:23 +01:00
parent 73a1702c47
commit 029c0c9244
9 changed files with 952 additions and 155 deletions

View file

@ -161,6 +161,8 @@ impl LpApplication {
self.set_accels_for_action("win.show-help-overlay", &["<Primary>question"]);
self.set_accels_for_action("win.toggle-fullscreen", &["F11"]);
self.set_accels_for_action("window.close", &["<Primary>W"]);
self.set_accels_for_action("win.zoom-to(1.0)", &["1"]);
self.set_accels_for_action("win.zoom-to(2.0)", &["2"]);
}
pub fn show_about(&self) {