image: Use contains in modifier type flag checks
This, for example, allows to also pan the image with Ctrl+Shift+Scroll like in EOG. Closes #175 Part-of: <https://gitlab.gnome.org/GNOME/Incubator/loupe/-/merge_requests/237>
This commit is contained in:
parent
0c2bdbd736
commit
cc1c8a3da5
1 changed files with 2 additions and 2 deletions
|
|
@ -344,8 +344,8 @@ mod imp {
|
|||
|
||||
scroll_controller.connect_scroll(glib::clone!(@weak obj => @default-return gtk::Inhibit(false), move |event, _, y| {
|
||||
// use Ctrl key as modifier for vertical scrolling
|
||||
if event.current_event_state() == gdk::ModifierType::CONTROL_MASK
|
||||
|| event.current_event_state() == gdk::ModifierType::SHIFT_MASK
|
||||
if event.current_event_state().contains(gdk::ModifierType::CONTROL_MASK)
|
||||
|| event.current_event_state().contains(gdk::ModifierType::SHIFT_MASK)
|
||||
{
|
||||
// propagate event to scrolled window
|
||||
return gtk::Inhibit(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue