parent
0d74083cf8
commit
4eb8b939b3
5 changed files with 92 additions and 2 deletions
|
|
@ -125,6 +125,22 @@ mod imp {
|
|||
win.zoom_best_fit();
|
||||
});
|
||||
|
||||
klass.install_action("win.pan-up", None, move |win, _, _| {
|
||||
win.pan(>k::PanDirection::Up);
|
||||
});
|
||||
|
||||
klass.install_action("win.pan-down", None, move |win, _, _| {
|
||||
win.pan(>k::PanDirection::Down);
|
||||
});
|
||||
|
||||
klass.install_action("win.pan-left", None, move |win, _, _| {
|
||||
win.pan(>k::PanDirection::Left);
|
||||
});
|
||||
|
||||
klass.install_action("win.pan-right", None, move |win, _, _| {
|
||||
win.pan(>k::PanDirection::Right);
|
||||
});
|
||||
|
||||
klass.install_action("win.leave-fullscreen", None, move |win, _, _| {
|
||||
win.toggle_fullscreen(false);
|
||||
});
|
||||
|
|
@ -367,6 +383,12 @@ impl LpWindow {
|
|||
}
|
||||
}
|
||||
|
||||
fn pan(&self, direction: >k::PanDirection) {
|
||||
if let Some(image) = self.imp().image_view.current_image() {
|
||||
image.pan(direction);
|
||||
}
|
||||
}
|
||||
|
||||
async fn pick_file(&self) {
|
||||
let filter_store = gio::ListStore::new(gtk::FileFilter::static_type());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue