search/password entry: Prevent expand leaks

We don't want the entry to expand, we just want
the text to expand inside the box, so explicitly
unset expand flags on the box.
This commit is contained in:
Matthias Clasen 2019-02-22 15:55:05 -05:00
parent 2b9436b279
commit c53e9ed6aa
2 changed files with 4 additions and 0 deletions

View File

@ -90,6 +90,8 @@ gtk_password_entry_init (GtkPasswordEntry *entry)
gtk_widget_set_has_surface (GTK_WIDGET (entry), FALSE);
priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_hexpand (priv->box, FALSE);
gtk_widget_set_vexpand (priv->box, FALSE);
gtk_widget_set_parent (priv->box, GTK_WIDGET (entry));
priv->entry = gtk_text_new ();

View File

@ -506,6 +506,8 @@ gtk_search_entry_init (GtkSearchEntry *entry)
priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_parent (priv->box, GTK_WIDGET (entry));
gtk_widget_set_hexpand (priv->box, FALSE);
gtk_widget_set_vexpand (priv->box, FALSE);
priv->entry = gtk_text_new ();
gtk_widget_set_hexpand (priv->entry, TRUE);