diff options
author | Alexander Mikhaylenko <alexm@gnome.org> | 2021-12-01 12:32:14 +0500 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2021-12-02 16:56:50 +0000 |
commit | 563b03a3f54a58f9ede696c54fbe446ccdf34e38 (patch) | |
tree | 3135db7ec3ffff4a5681e0747dc2384df5ab2b64 /embed | |
parent | 806e7704514767fc7585f261ff15bdf2b52ff19e (diff) | |
download | epiphany-563b03a3f54a58f9ede696c54fbe446ccdf34e38.tar.gz |
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().
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1038>
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-download.c | 10 | ||||
-rw-r--r-- | embed/ephy-embed.c | 11 |
2 files changed, 11 insertions, 10 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); } /** |