Skip to content

Commit 3a7dd7f

Browse files
authored
Enable scroll in histogram view and curve editor (#246)
Both GthHistogramView and GthCurveEditor have histograms with event handler code for scroll-event but the widgets are missing the GDK_SCROLL_MASK bit for events, resulting in no scroll support. The event handlers already exist. Adding the mask bit makes the event handlers effective.
1 parent 1df5501 commit 3a7dd7f

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

extensions/file_tools/gth-curve-editor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,7 @@ gth_curve_editor_init (GthCurveEditor *self)
10031003
| GDK_POINTER_MOTION_HINT_MASK
10041004
| GDK_ENTER_NOTIFY_MASK
10051005
| GDK_LEAVE_NOTIFY_MASK
1006+
| GDK_SCROLL_MASK
10061007
| GDK_STRUCTURE_MASK));
10071008
gtk_widget_show (self->priv->view);
10081009
gtk_container_add (GTK_CONTAINER (view_container), self->priv->view);

pix/gth-histogram-view.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ gth_histogram_view_init (GthHistogramView *self)
936936
gtk_widget_show (view_container);
937937

938938
self->priv->view = gtk_drawing_area_new ();
939-
gtk_widget_add_events (self->priv->view, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_STRUCTURE_MASK);
939+
gtk_widget_add_events (self->priv->view, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_STRUCTURE_MASK | GDK_SCROLL_MASK);
940940
gtk_widget_show (self->priv->view);
941941
gtk_container_add (GTK_CONTAINER (view_container), self->priv->view);
942942

0 commit comments

Comments
 (0)