diff --git a/data/gtk/window.ui b/data/gtk/window.ui index fc0f0ac..ab31a43 100644 --- a/data/gtk/window.ui +++ b/data/gtk/window.ui @@ -194,7 +194,18 @@ - + + + + 9 + + + + + 8 + + + diff --git a/src/window.rs b/src/window.rs index 90db883..de92b38 100644 --- a/src/window.rs +++ b/src/window.rs @@ -91,6 +91,12 @@ mod imp { pub(super) properties_view: TemplateChild, #[template_child] pub(super) drop_target: TemplateChild, + + #[template_child] + pub(super) forward_click_gesture: TemplateChild, + #[template_child] + pub(super) backward_click_gesture: TemplateChild, + /// Motion controller for complete window pub(super) motion_controller: gtk::EventControllerMotion, pub(super) pointer_position: Cell<(f64, f64)>, @@ -241,6 +247,15 @@ mod imp { self.parent_constructed(); + self.forward_click_gesture + .connect_pressed(clone!(@weak obj => move |_,_,_,_| { + obj.image_view().navigate(Direction::Forward); + })); + self.backward_click_gesture + .connect_pressed(clone!(@weak obj => move |_,_,_,_| { + obj.image_view().navigate(Direction::Back); + })); + if config::PROFILE == ".Devel" { obj.add_css_class("devel"); }