sdgui: bind Up/Down to view scrolling

This commit is contained in:
Přemysl Eric Janouch 2021-10-20 11:51:38 +02:00
parent b721e26557
commit 519d6bd108
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 4 additions and 0 deletions

View File

@ -219,6 +219,10 @@ on_key_press (G_GNUC_UNUSED GtkWidget *widget, GdkEvent *event,
return stardict_view_scroll (view, GTK_SCROLL_PAGES, -0.5), TRUE;
if (event->key.keyval == GDK_KEY_Page_Down)
return stardict_view_scroll (view, GTK_SCROLL_PAGES, +0.5), TRUE;
if (event->key.keyval == GDK_KEY_Up)
return stardict_view_scroll (view, GTK_SCROLL_STEPS, -1), TRUE;
if (event->key.keyval == GDK_KEY_Down)
return stardict_view_scroll (view, GTK_SCROLL_STEPS, +1), TRUE;
}
return FALSE;
}