Skip to content

Commit

Permalink
gtkui: Put an alignment around the slider to avoid button-press-event…
Browse files Browse the repository at this point in the history
…s when clicking under/above the slider. Fixes #103 entirely.
  • Loading branch information
radioactiveman committed Jun 11, 2012
1 parent 8e02b6b commit 497a0dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gtkui/ui_gtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,12 @@ static gboolean init (void)
gtk_scale_set_draw_value(GTK_SCALE(slider), FALSE);
gtk_widget_set_size_request(slider, 120, -1);
gtk_widget_set_can_focus(slider, FALSE);
gtk_box_pack_start ((GtkBox *) box1, slider, TRUE, TRUE, 6);

/* Put the slider in an alignment so clicking under/above the slider
* does not emmit a button-press-event. Fixes bugreport #103 */
GtkWidget * alignment = gtk_alignment_new (0.5, 0.5, 1, 0);
gtk_container_add ((GtkContainer *) alignment, slider);
gtk_box_pack_start ((GtkBox *) box1, alignment, TRUE, TRUE, 6);

label_time = markup_label_new(NULL);
gtk_box_pack_end ((GtkBox *) box1, label_time, FALSE, FALSE, 6);
Expand Down

0 comments on commit 497a0dc

Please sign in to comment.