[epiphany/wip/exalm/gtk4-cleanups-3: 2/18] Unify gtk_box_pack_*() arguments




commit 121af3fb52ea6fdf5fc70a33d230357e421b7c64
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Dec 1 12:32:14 2021 +0500

    Unify gtk_box_pack_*() arguments
    
    In GTK4 gtk_box_pack_start() is gone, replaced with gtk_box_append(). More
    importantly, child properties are gone and pack_start() allows to set them.
    
    With this in mind, stop using anything other than their default values:
    FALSE, TRUE, 0. Everything else can be done with halign, valign, hexpand,
    vexpand and margins.
    
    gtk_box_pack_end() is gone as well. Replace with pack_start() where
    possible (which involves rearranging the order in which widgets are added),
    and the remaining uses at this point can be replaced with gtk_box_prepend().

 embed/ephy-download.c                       | 10 ++++-----
 embed/ephy-embed.c                          | 11 +++++-----
 lib/widgets/contrib/nautilus-floating-bar.c |  7 +++---
 lib/widgets/ephy-certificate-dialog.c       |  5 +++--
 lib/widgets/ephy-downloads-popover.c        | 21 +++++++-----------
 lib/widgets/ephy-location-entry.c           | 34 ++++++++++++++---------------
 lib/widgets/ephy-security-popover.c         | 11 +++++-----
 lib/widgets/ephy-title-box.c                |  8 +++----
 src/bookmarks/ephy-bookmark-properties.c    |  8 ++++---
 src/bookmarks/ephy-bookmarks-popover.c      |  5 +++--
 src/ephy-action-bar-start.c                 |  7 +++---
 src/ephy-firefox-sync-dialog.c              |  2 +-
 src/ephy-window.c                           |  6 +++--
 src/window-commands.c                       | 16 +++++++++-----
 14 files changed, 80 insertions(+), 71 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index eb95b6e9b..6f982ead2 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -860,7 +860,7 @@ filename_suggested_cb (EphyDownload *download,
   response = webkit_download_get_response (webkit_download);
 
   box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
-  gtk_box_pack_start (GTK_BOX (message_area), box, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (message_area), box, FALSE, TRUE, 0);
 
   /* Type */
   content_length = g_format_size (webkit_uri_response_get_content_length (response));
@@ -868,22 +868,22 @@ filename_suggested_cb (EphyDownload *download,
   type_text = g_strdup_printf (_("Type: %s (%s)"), g_content_type_get_description (content_type), 
content_length);
   type_label = gtk_label_new (type_text);
   gtk_widget_set_margin_top (type_label, 12);
-  gtk_box_pack_start (GTK_BOX (box), type_label, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (box), type_label, FALSE, TRUE, 0);
 
   /* From */
   from_text = g_strdup_printf (_("From: %s"), ephy_string_get_host_name (webkit_uri_response_get_uri 
(response)));
   from_label = gtk_label_new (from_text);
-  gtk_box_pack_start (GTK_BOX (box), from_label, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (box), from_label, FALSE, TRUE, 0);
 
   /* Question */
   question_label = gtk_label_new (_("Where do you want to save the file?"));
   gtk_widget_set_margin_top (question_label, 12);
-  gtk_box_pack_start (GTK_BOX (box), question_label, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (box), question_label, FALSE, TRUE, 0);
 
   /* File Chooser Button */
   filechooser = gtk_file_chooser_button_new (_("Save file"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
   gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filechooser), g_settings_get_string 
(EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_LAST_DOWNLOAD_DIRECTORY));
-  gtk_box_pack_start (GTK_BOX (box), filechooser, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (box), filechooser, FALSE, TRUE, 0);
 
   gtk_widget_show_all (box);
 
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 334baf589..77743f257 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -725,6 +725,7 @@ ephy_embed_constructed (GObject *object)
   gtk_widget_add_events (embed->overlay,
                          GDK_ENTER_NOTIFY_MASK |
                          GDK_LEAVE_NOTIFY_MASK);
+  gtk_widget_set_vexpand (embed->overlay, TRUE);
   gtk_container_add (GTK_CONTAINER (embed->overlay), GTK_WIDGET (embed->web_view));
 
   /* Floating message popup for fullscreen mode. */
@@ -760,7 +761,7 @@ ephy_embed_constructed (GObject *object)
 
   gtk_box_pack_start (GTK_BOX (embed),
                       GTK_WIDGET (embed->find_toolbar),
-                      FALSE, FALSE, 0);
+                      FALSE, TRUE, 0);
 
   if (embed->progress_bar_enabled)
     embed->progress_update_handler_id = g_signal_connect (embed->web_view, "notify::estimated-load-progress",
@@ -768,8 +769,8 @@ ephy_embed_constructed (GObject *object)
 
   gtk_box_pack_start (GTK_BOX (embed),
                       GTK_WIDGET (embed->top_widgets_vbox),
-                      FALSE, FALSE, 0);
-  gtk_box_pack_start (GTK_BOX (embed), embed->overlay, TRUE, TRUE, 0);
+                      FALSE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (embed), embed->overlay, FALSE, TRUE, 0);
 
   gtk_widget_show (GTK_WIDGET (embed->top_widgets_vbox));
   gtk_widget_show (GTK_WIDGET (embed->web_view));
@@ -804,7 +805,7 @@ ephy_embed_constructed (GObject *object)
     gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar), GTK_MESSAGE_INFO);
     /* Translators: this means WebDriver control. */
     label = gtk_label_new (_("Web is being controlled by automation."));
-    gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar))), label, FALSE, 
FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar))), label, FALSE, 
TRUE, 0);
     gtk_widget_show (label);
 
     ephy_embed_add_top_widget (embed, info_bar, EPHY_EMBED_TOP_WIDGET_POLICY_RETAIN_ON_TRANSITION);
@@ -883,7 +884,7 @@ ephy_embed_add_top_widget (EphyEmbed                *embed,
   }
 
   gtk_box_pack_end (embed->top_widgets_vbox,
-                    GTK_WIDGET (widget), FALSE, FALSE, 0);
+                    GTK_WIDGET (widget), FALSE, TRUE, 0);
 }
 
 /**
diff --git a/lib/widgets/contrib/nautilus-floating-bar.c b/lib/widgets/contrib/nautilus-floating-bar.c
index 20f5b78ca..f6815af27 100644
--- a/lib/widgets/contrib/nautilus-floating-bar.c
+++ b/lib/widgets/contrib/nautilus-floating-bar.c
@@ -355,7 +355,7 @@ nautilus_floating_bar_constructed (GObject *obj)
   box = GTK_WIDGET (obj);
 
   w = gtk_spinner_new ();
-  gtk_box_pack_start (GTK_BOX (box), w, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (box), w, FALSE, TRUE, 0);
   gtk_widget_set_visible (w, self->show_spinner);
 
   g_object_bind_property (obj, "show-spinner",
@@ -367,7 +367,8 @@ nautilus_floating_bar_constructed (GObject *obj)
   gtk_widget_set_margin_start (w, 8);
 
   labels_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
-  gtk_box_pack_start (GTK_BOX (box), labels_box, TRUE, TRUE, 0);
+  gtk_widget_set_hexpand (labels_box, TRUE);
+  gtk_box_pack_start (GTK_BOX (box), labels_box, FALSE, TRUE, 0);
   g_object_set (labels_box,
                 "margin-top", 2,
                 "margin-bottom", 2,
@@ -524,7 +525,7 @@ nautilus_floating_bar_add_action (NautilusFloatingBar *self,
   gtk_style_context_add_class (context, "circular");
   gtk_style_context_add_class (context, "flat");
   gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
-  gtk_box_pack_end (GTK_BOX (self), button, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (self), button, FALSE, TRUE, 0);
   gtk_widget_show (button);
 
   g_object_set_data (G_OBJECT (button), "action-id",
diff --git a/lib/widgets/ephy-certificate-dialog.c b/lib/widgets/ephy-certificate-dialog.c
index 0e79fcc45..9241e74a3 100644
--- a/lib/widgets/ephy-certificate-dialog.c
+++ b/lib/widgets/ephy-certificate-dialog.c
@@ -83,10 +83,11 @@ ephy_certificate_dialog_set_certificate (EphyCertificateDialog *dialog,
   g_byte_array_unref (certificate_data);
 
   certificate_widget = GTK_WIDGET (gcr_certificate_widget_new (simple_certificate));
+  gtk_widget_set_vexpand (certificate_widget, TRUE);
   g_object_unref (simple_certificate);
 
   content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
-  gtk_box_pack_start (GTK_BOX (content_area), certificate_widget, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (content_area), certificate_widget, FALSE, TRUE, 0);
   gtk_widget_show (certificate_widget);
 }
 
@@ -321,7 +322,7 @@ ephy_certificate_dialog_init (EphyCertificateDialog *dialog)
 
   content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
   gtk_box_set_spacing (GTK_BOX (content_area), 14);
-  gtk_box_pack_start (GTK_BOX (content_area), grid, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (content_area), grid, FALSE, TRUE, 0);
   gtk_widget_show (grid);
 }
 
diff --git a/lib/widgets/ephy-downloads-popover.c b/lib/widgets/ephy-downloads-popover.c
index 9711c0070..c91857671 100644
--- a/lib/widgets/ephy-downloads-popover.c
+++ b/lib/widgets/ephy-downloads-popover.c
@@ -170,7 +170,7 @@ static void
 ephy_downloads_popover_init (EphyDownloadsPopover *popover)
 {
   GtkWidget *scrolled_window;
-  GtkWidget *vbox, *hbox;
+  GtkWidget *vbox;
   GList *downloads, *l;
   EphyDownloadsManager *manager = ephy_embed_shell_get_downloads_manager (ephy_embed_shell_get_default ());
 
@@ -222,27 +222,22 @@ ephy_downloads_popover_init (EphyDownloadsPopover *popover)
                            G_CALLBACK (download_removed_cb),
                            popover, G_CONNECT_SWAPPED);
 
-  gtk_box_pack_start (GTK_BOX (vbox), scrolled_window, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (vbox), scrolled_window, FALSE, TRUE, 0);
   gtk_widget_show (scrolled_window);
 
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-  gtk_widget_set_valign (hbox, GTK_ALIGN_CENTER);
-  gtk_widget_set_margin_start (hbox, 12);
-  gtk_widget_set_margin_end (hbox, 12);
-  gtk_widget_set_margin_top (hbox, 12);
-  gtk_widget_set_margin_bottom (hbox, 12);
-
   popover->clear_button = gtk_button_new_with_mnemonic (_("_Clear All"));
   gtk_widget_set_sensitive (popover->clear_button, !ephy_downloads_manager_has_active_downloads (manager));
   g_signal_connect_swapped (popover->clear_button, "clicked",
                             G_CALLBACK (clear_button_clicked_cb),
                             popover);
-  gtk_box_pack_end (GTK_BOX (hbox), popover->clear_button, FALSE, FALSE, 0);
+  gtk_widget_set_halign (popover->clear_button, GTK_ALIGN_END);
+  gtk_widget_set_margin_start (popover->clear_button, 12);
+  gtk_widget_set_margin_end (popover->clear_button, 12);
+  gtk_widget_set_margin_top (popover->clear_button, 12);
+  gtk_widget_set_margin_bottom (popover->clear_button, 12);
+  gtk_box_pack_start (GTK_BOX (vbox), popover->clear_button, FALSE, TRUE, 0);
   gtk_widget_show (popover->clear_button);
 
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-  gtk_widget_show (hbox);
-
   gtk_container_add (GTK_CONTAINER (popover), vbox);
   gtk_widget_show (vbox);
 }
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 91524187a..3e8ba964d 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -1111,18 +1111,32 @@ ephy_location_entry_construct_contents (EphyLocationEntry *entry)
 
   /* Page action box */
   entry->page_action_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-  gtk_box_pack_start (GTK_BOX (box), entry->page_action_box, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (box), entry->page_action_box, FALSE, TRUE, 0);
 
   context = gtk_widget_get_style_context (box);
   gtk_style_context_add_class (context, "entry_icon_box");
 
+  /* Reader Mode */
+  entry->reader_mode_button = gtk_button_new_from_icon_name (NULL, GTK_ICON_SIZE_MENU);
+  gtk_widget_set_tooltip_text (entry->reader_mode_button, _("Toggle reader mode"));
+  entry->reader_mode_icon = gtk_button_get_image (GTK_BUTTON (entry->reader_mode_button));
+  gtk_widget_set_valign (entry->reader_mode_icon, GTK_ALIGN_CENTER);
+  gtk_box_pack_start (GTK_BOX (box), entry->reader_mode_button, FALSE, TRUE, 0);
+
+  context = gtk_widget_get_style_context (entry->reader_mode_icon);
+  gtk_style_context_add_class (context, "entry_icon");
+
+  update_reader_icon (entry);
+  g_signal_connect_object (gtk_settings_get_default (), "notify::gtk-icon-theme-name",
+                           G_CALLBACK (update_reader_icon), entry, G_CONNECT_SWAPPED);
+
   /* Bookmark */
   entry->bookmark_button = gtk_button_new_from_icon_name ("non-starred-symbolic", GTK_ICON_SIZE_MENU);
   gtk_widget_set_tooltip_text (entry->bookmark_button, _("Bookmark this page"));
   entry->bookmark_icon = gtk_button_get_image (GTK_BUTTON (entry->bookmark_button));
   gtk_widget_set_valign (entry->bookmark_icon, GTK_ALIGN_CENTER);
   g_signal_connect (G_OBJECT (entry->bookmark_button), "clicked", G_CALLBACK 
(bookmark_icon_button_clicked_cb), entry);
-  gtk_box_pack_end (GTK_BOX (box), entry->bookmark_button, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (box), entry->bookmark_button, FALSE, TRUE, 0);
 
   context = gtk_widget_get_style_context (entry->bookmark_icon);
   gtk_style_context_add_class (context, "entry_icon");
@@ -1133,20 +1147,6 @@ ephy_location_entry_construct_contents (EphyLocationEntry *entry)
                    "visible",
                    G_SETTINGS_BIND_GET | G_SETTINGS_BIND_INVERT_BOOLEAN);
 
-  /* Reader Mode */
-  entry->reader_mode_button = gtk_button_new_from_icon_name (NULL, GTK_ICON_SIZE_MENU);
-  gtk_widget_set_tooltip_text (entry->reader_mode_button, _("Toggle reader mode"));
-  entry->reader_mode_icon = gtk_button_get_image (GTK_BUTTON (entry->reader_mode_button));
-  gtk_widget_set_valign (entry->reader_mode_icon, GTK_ALIGN_CENTER);
-  gtk_box_pack_end (GTK_BOX (box), entry->reader_mode_button, FALSE, FALSE, 0);
-
-  context = gtk_widget_get_style_context (entry->reader_mode_icon);
-  gtk_style_context_add_class (context, "entry_icon");
-
-  update_reader_icon (entry);
-  g_signal_connect_object (gtk_settings_get_default (), "notify::gtk-icon-theme-name",
-                           G_CALLBACK (update_reader_icon), entry, G_CONNECT_SWAPPED);
-
   g_object_connect (entry->url_entry,
                     "signal::icon-press", G_CALLBACK (icon_button_icon_press_event_cb), entry,
                     "signal::populate-popup", G_CALLBACK (entry_populate_popup_cb), entry,
@@ -1592,7 +1592,7 @@ void
 ephy_location_entry_page_action_add (EphyLocationEntry *entry,
                                      GtkWidget         *action)
 {
-  gtk_box_pack_end (GTK_BOX (entry->page_action_box), action, FALSE, FALSE, 0);
+  gtk_box_pack_end (GTK_BOX (entry->page_action_box), action, FALSE, TRUE, 0);
 
   gtk_widget_show (entry->page_action_box);
 }
diff --git a/lib/widgets/ephy-security-popover.c b/lib/widgets/ephy-security-popover.c
index 05eb96cba..78318175e 100644
--- a/lib/widgets/ephy-security-popover.c
+++ b/lib/widgets/ephy-security-popover.c
@@ -500,12 +500,13 @@ add_permission_combobox (EphySecurityPopover *popover,
   GtkWidget *hbox;
   GtkWidget *tmp;
 
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
   gtk_grid_attach (GTK_GRID (popover->grid), hbox, 0, popover->permission_pos++, 2, 1);
 
   tmp = gtk_label_new (name);
   gtk_label_set_xalign (GTK_LABEL (tmp), 0.0);
-  gtk_box_pack_start (GTK_BOX (hbox), tmp, TRUE, TRUE, 6);
+  gtk_widget_set_hexpand (tmp, TRUE);
+  gtk_box_pack_start (GTK_BOX (hbox), tmp, FALSE, TRUE, 0);
 
   widget = gtk_combo_box_text_new ();
   gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), _("Allow"));
@@ -516,7 +517,7 @@ add_permission_combobox (EphySecurityPopover *popover,
     gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), _(name));
   }
 
-  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 6);
+  gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, TRUE, 0);
   g_signal_connect (widget, "changed", G_CALLBACK (callback), popover);
   gtk_size_group_add_widget (size_group, widget);
 
@@ -541,13 +542,13 @@ ephy_security_popover_init (EphySecurityPopover *popover)
   gtk_widget_set_hexpand (box, TRUE);
 
   popover->lock_image = gtk_image_new ();
-  gtk_box_pack_start (GTK_BOX (box), popover->lock_image, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (box), popover->lock_image, FALSE, TRUE, 0);
 
   popover->host_label = gtk_label_new (NULL);
   gtk_label_set_line_wrap (GTK_LABEL (popover->host_label), TRUE);
   gtk_label_set_line_wrap_mode (GTK_LABEL (popover->host_label), PANGO_WRAP_WORD_CHAR);
   gtk_label_set_xalign (GTK_LABEL (popover->host_label), 0.0);
-  gtk_box_pack_start (GTK_BOX (box), popover->host_label, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (box), popover->host_label, FALSE, TRUE, 0);
 
   popover->security_label = gtk_label_new (NULL);
   gtk_label_set_line_wrap (GTK_LABEL (popover->security_label), TRUE);
diff --git a/lib/widgets/ephy-title-box.c b/lib/widgets/ephy-title-box.c
index e12a55e8c..df70145bd 100644
--- a/lib/widgets/ephy-title-box.c
+++ b/lib/widgets/ephy-title-box.c
@@ -91,19 +91,19 @@ ephy_title_box_constructed (GObject *object)
   gtk_label_set_single_line_mode (GTK_LABEL (title_box->title), TRUE);
   gtk_label_set_ellipsize (GTK_LABEL (title_box->title), PANGO_ELLIPSIZE_END);
   gtk_label_set_text (GTK_LABEL (title_box->title), g_get_application_name ());
-  gtk_box_pack_start (GTK_BOX (vbox), title_box->title, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (vbox), title_box->title, FALSE, TRUE, 0);
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
   context = gtk_widget_get_style_context (hbox);
   gtk_style_context_add_class (context, "subtitle");
   gtk_widget_set_halign (hbox, GTK_ALIGN_CENTER);
   gtk_widget_set_valign (hbox, GTK_ALIGN_BASELINE);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
 
   title_box->lock_image = gtk_image_new ();
   g_object_set (title_box->lock_image, "icon-size", GTK_ICON_SIZE_MENU, NULL);
   gtk_widget_set_valign (title_box->lock_image, GTK_ALIGN_BASELINE);
-  gtk_box_pack_start (GTK_BOX (hbox), title_box->lock_image, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (hbox), title_box->lock_image, FALSE, TRUE, 0);
 
   title_box->subtitle = gtk_label_new (NULL);
   gtk_widget_set_valign (title_box->subtitle, GTK_ALIGN_BASELINE);
@@ -111,7 +111,7 @@ ephy_title_box_constructed (GObject *object)
   gtk_label_set_single_line_mode (GTK_LABEL (title_box->subtitle), TRUE);
   gtk_label_set_ellipsize (GTK_LABEL (title_box->subtitle), PANGO_ELLIPSIZE_END);
   gtk_label_set_selectable (GTK_LABEL (title_box->subtitle), TRUE);
-  gtk_box_pack_start (GTK_BOX (hbox), title_box->subtitle, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (hbox), title_box->subtitle, FALSE, TRUE, 0);
 
   gtk_widget_add_events (GTK_WIDGET (title_box), GDK_BUTTON_PRESS_MASK);
   gtk_widget_show_all (GTK_WIDGET (title_box));
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index 99924a02f..da1f4c6a0 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -182,13 +182,15 @@ ephy_bookmark_properties_create_tag_widget (EphyBookmarkProperties *self,
                                           GTK_ICON_SIZE_BUTTON);
     gtk_widget_set_margin_bottom (image, 8);
     gtk_widget_set_margin_top (image, 8);
-    gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (box), image, FALSE, TRUE, 0);
   }
 
   label_text = default_tag ? EPHY_BOOKMARKS_FAVORITES_TAG : tag;
   label = gtk_label_new (label_text);
+  gtk_widget_set_hexpand (label, TRUE);
+  gtk_label_set_xalign (GTK_LABEL (label), 0);
   gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
-  gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0);
 
   if (!default_tag) {
     GtkWidget *button;
@@ -199,7 +201,7 @@ ephy_bookmark_properties_create_tag_widget (EphyBookmarkProperties *self,
                                                         GTK_ICON_SIZE_MENU));
     gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
     gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
-    gtk_box_pack_end (GTK_BOX (box), button, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
     g_signal_connect_object (button, "clicked",
                              G_CALLBACK (ephy_bookmark_properties_tag_widget_button_clicked_cb),
                              self,
diff --git a/src/bookmarks/ephy-bookmarks-popover.c b/src/bookmarks/ephy-bookmarks-popover.c
index 0c34a4fe5..ebe83f3cc 100644
--- a/src/bookmarks/ephy-bookmarks-popover.c
+++ b/src/bookmarks/ephy-bookmarks-popover.c
@@ -244,10 +244,11 @@ create_tag_row (const char *tag)
   }
   label = gtk_label_new (tag);
 
+  gtk_widget_set_hexpand (label, TRUE);
   gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
 
-  gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
-  gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (box), image, FALSE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0);
 
   gtk_container_add (GTK_CONTAINER (row), box);
   gtk_widget_show_all (row);
diff --git a/src/ephy-action-bar-start.c b/src/ephy-action-bar-start.c
index feac717fe..913700590 100644
--- a/src/ephy-action-bar-start.c
+++ b/src/ephy-action-bar-start.c
@@ -131,16 +131,17 @@ new_history_menu_item (EphyWebView *view,
 
   g_assert (address != NULL && origtext != NULL);
 
-  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
 
   image = gtk_image_new ();
-  gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (box), image, FALSE, TRUE, 0);
 
   label = gtk_label_new (origtext);
   gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
   gtk_label_set_max_width_chars (GTK_LABEL (label), MAX_LABEL_LENGTH);
   gtk_label_set_xalign (GTK_LABEL (label), 0.0f);
-  gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 6);
+  gtk_widget_set_hexpand (label, TRUE);
+  gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0);
 
   menu_item = gtk_menu_item_new ();
   gtk_container_add (GTK_CONTAINER (menu_item), box);
diff --git a/src/ephy-firefox-sync-dialog.c b/src/ephy-firefox-sync-dialog.c
index bc0f903f5..870ac997e 100644
--- a/src/ephy-firefox-sync-dialog.c
+++ b/src/ephy-firefox-sync-dialog.c
@@ -492,7 +492,7 @@ sync_setup_firefox_iframe (EphyFirefoxSyncDialog *sync_dialog)
                        GTK_WIDGET (sync_dialog->fxa_web_view));
     gtk_box_pack_start (GTK_BOX (sync_dialog->sync_firefox_iframe_box),
                         frame,
-                        TRUE, TRUE, 0);
+                        FALSE, TRUE, 0);
 
     g_object_unref (sync_context);
   }
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 046360e12..563f769b5 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3033,6 +3033,8 @@ setup_tab_view (EphyWindow *window)
   HdyTabView *view = ephy_tab_view_get_tab_view (tab_view);
   g_autoptr (GtkBuilder) builder = NULL;
 
+  gtk_widget_set_vexpand (GTK_WIDGET (tab_view), TRUE);
+
   builder = gtk_builder_new_from_resource ("/org/gnome/epiphany/gtk/notebook-context-menu.ui");
 
   hdy_tab_view_set_menu_model (view, G_MENU_MODEL (gtk_builder_get_object (builder, "notebook-menu")));
@@ -3558,7 +3560,7 @@ add_default_browser_question (GtkBox *box)
 
   g_signal_connect (info_bar, "response", G_CALLBACK (on_default_browser_question_response), NULL);
 
-  gtk_box_pack_start (box, info_bar, FALSE, FALSE, 0);
+  gtk_box_pack_start (box, info_bar, FALSE, TRUE, 0);
 
   gtk_widget_show (info_bar);
 }
@@ -3750,7 +3752,7 @@ ephy_window_constructed (GObject *object)
   gtk_container_add (GTK_CONTAINER (window->tab_bar_revealer), GTK_WIDGET (window->tab_bar));
   gtk_box_pack_start (window->titlebar_box, GTK_WIDGET (window->window_handle), FALSE, TRUE, 0);
   gtk_box_pack_start (window->titlebar_box, GTK_WIDGET (window->tab_bar_revealer), FALSE, TRUE, 0);
-  gtk_box_pack_start (box, GTK_WIDGET (window->tab_view), TRUE, TRUE, 0);
+  gtk_box_pack_start (box, GTK_WIDGET (window->tab_view), FALSE, TRUE, 0);
   gtk_box_pack_start (box, GTK_WIDGET (window->action_bar), FALSE, TRUE, 0);
   gtk_container_add (GTK_CONTAINER (window->fullscreen_box), GTK_WIDGET (box));
   ephy_fullscreen_box_set_titlebar (window->fullscreen_box, GTK_WIDGET (window->titlebar_box));
diff --git a/src/window-commands.c b/src/window-commands.c
index ef340197a..9edc8163e 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -559,10 +559,11 @@ window_cmd_import_bookmarks (GSimpleAction *action,
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
 
   label = gtk_label_new (_("From:"));
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
 
   tree_model = create_tree_model ();
   combo_box = gtk_combo_box_new_with_model (GTK_TREE_MODEL (tree_model));
+  gtk_widget_set_hexpand (combo_box, TRUE);
   g_object_unref (tree_model);
   gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
 
@@ -574,7 +575,7 @@ window_cmd_import_bookmarks (GSimpleAction *action,
   gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), cell_renderer, TRUE);
   gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), cell_renderer,
                                   "text", 0, NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), combo_box, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (hbox), combo_box, FALSE, TRUE, 0);
 
   gtk_container_add (GTK_CONTAINER (content_area), hbox);
 
@@ -799,7 +800,7 @@ window_cmd_import_passwords (GSimpleAction *action,
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
 
   label = gtk_label_new (_("From:"));
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
 
   tree_model = create_import_passwords_tree_model ();
 
@@ -809,6 +810,7 @@ window_cmd_import_passwords (GSimpleAction *action,
     gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE);
 
   combo_box = gtk_combo_box_new_with_model (GTK_TREE_MODEL (tree_model));
+  gtk_widget_set_hexpand (combo_box, TRUE);
   g_object_unref (tree_model);
 
   g_signal_connect (GTK_COMBO_BOX (combo_box), "changed",
@@ -821,7 +823,7 @@ window_cmd_import_passwords (GSimpleAction *action,
   gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), cell_renderer, TRUE);
   gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), cell_renderer,
                                   "text", 0, NULL);
-  gtk_box_pack_start (GTK_BOX (hbox), combo_box, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (hbox), combo_box, FALSE, TRUE, 0);
 
   gtk_container_add (GTK_CONTAINER (content_area), hbox);
 
@@ -1923,6 +1925,7 @@ window_cmd_save_as_application (GSimpleAction *action,
   gtk_container_set_border_width (GTK_CONTAINER (box), 5);
 
   image = gtk_image_new ();
+  gtk_widget_set_vexpand (image, TRUE);
   gtk_widget_set_no_show_all (image, TRUE);
   gtk_widget_set_size_request (image, DEFAULT_ICON_SIZE, DEFAULT_ICON_SIZE);
   gtk_widget_set_margin_bottom (image, 10);
@@ -1933,13 +1936,14 @@ window_cmd_save_as_application (GSimpleAction *action,
 
   spinner = gtk_spinner_new ();
   gtk_widget_set_size_request (spinner, DEFAULT_ICON_SIZE, DEFAULT_ICON_SIZE);
+  gtk_widget_set_vexpand (spinner, TRUE);
   gtk_spinner_start (GTK_SPINNER (spinner));
   gtk_container_add (GTK_CONTAINER (box), spinner);
   gtk_widget_show (spinner);
 
   entry = gtk_entry_new ();
   gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
-  gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (box), entry, FALSE, TRUE, 0);
 
   escaped_address = g_markup_escape_text (ephy_web_view_get_display_address (view), -1);
   markup = g_strdup_printf ("<small>%s</small>", escaped_address);
@@ -1950,7 +1954,7 @@ window_cmd_save_as_application (GSimpleAction *action,
   g_free (markup);
   g_free (escaped_address);
 
-  gtk_box_pack_end (GTK_BOX (box), label, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0);
   context = gtk_widget_get_style_context (label);
   gtk_style_context_add_class (context, "dim-label");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]