diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c index 9697dad4b6..b2e5b15d0f 100644 --- a/gtk/gtkemojichooser.c +++ b/gtk/gtkemojichooser.c @@ -35,6 +35,8 @@ #include "gtkintl.h" #include "gtkprivate.h" +#define BOX_SPACE 6 + typedef struct { GtkWidget *box; GtkWidget *heading; @@ -124,7 +126,7 @@ scroll_to_section (GtkButton *button, if (section->heading) gtk_widget_get_allocation (section->heading, &alloc); - gtk_adjustment_animate_to_value (adj, alloc.y); + gtk_adjustment_animate_to_value (adj, alloc.y - BOX_SPACE); } static void @@ -493,7 +495,7 @@ adj_value_changed (GtkAdjustment *adj, else gtk_widget_get_allocation (section->box, &alloc); - if (value < alloc.y) + if (value < alloc.y - BOX_SPACE) break; select_section = section;