Avoid empty space in the emoji chooser

We need to hide the empty flow boxes as well, to avoid
spacing between them.

https://bugzilla.gnome.org/show_bug.cgi?id=786966
This commit is contained in:
Matthias Clasen 2017-08-30 08:36:56 -04:00 committed by Daniel Boles
parent 305ac38b6a
commit beb7bba3ce

View File

@ -482,14 +482,23 @@ static void
update_headings (GtkEmojiChooser *chooser)
{
gtk_widget_set_visible (chooser->people.heading, !chooser->people.empty);
gtk_widget_set_visible (chooser->people.box, !chooser->people.empty);
gtk_widget_set_visible (chooser->body.heading, !chooser->body.empty);
gtk_widget_set_visible (chooser->body.box, !chooser->body.empty);
gtk_widget_set_visible (chooser->nature.heading, !chooser->nature.empty);
gtk_widget_set_visible (chooser->nature.box, !chooser->nature.empty);
gtk_widget_set_visible (chooser->food.heading, !chooser->food.empty);
gtk_widget_set_visible (chooser->food.box, !chooser->food.empty);
gtk_widget_set_visible (chooser->travel.heading, !chooser->travel.empty);
gtk_widget_set_visible (chooser->travel.box, !chooser->travel.empty);
gtk_widget_set_visible (chooser->activities.heading, !chooser->activities.empty);
gtk_widget_set_visible (chooser->activities.box, !chooser->activities.empty);
gtk_widget_set_visible (chooser->objects.heading, !chooser->objects.empty);
gtk_widget_set_visible (chooser->objects.box, !chooser->objects.empty);
gtk_widget_set_visible (chooser->symbols.heading, !chooser->symbols.empty);
gtk_widget_set_visible (chooser->symbols.box, !chooser->symbols.empty);
gtk_widget_set_visible (chooser->flags.heading, !chooser->flags.empty);
gtk_widget_set_visible (chooser->flags.box, !chooser->flags.empty);
if (chooser->recent.empty && chooser->people.empty &&
chooser->body.empty && chooser->nature.empty &&