monsta 2016-09-14 14:19:05 +03:00
parent 8d2eb08981
commit 622e2d1272
1 changed files with 18 additions and 0 deletions

View File

@ -2931,6 +2931,24 @@ notebook_scroll_event_cb (GtkWidget *widget,
case GDK_SCROLL_UP: case GDK_SCROLL_UP:
gtk_notebook_prev_page (notebook); gtk_notebook_prev_page (notebook);
break; break;
case GDK_SCROLL_SMOOTH:
switch (gtk_notebook_get_tab_pos (notebook)) {
case GTK_POS_LEFT:
case GTK_POS_RIGHT:
if (event->delta_y > 0)
gtk_notebook_next_page (notebook);
else if (event->delta_y < 0)
gtk_notebook_prev_page (notebook);
break;
case GTK_POS_TOP:
case GTK_POS_BOTTOM:
if (event->delta_x > 0)
gtk_notebook_next_page (notebook);
else if (event->delta_x < 0)
gtk_notebook_prev_page (notebook);
break;
}
break;
} }
return TRUE; return TRUE;