diff options
author | Diego Escalante Urrelo <diegoe@igalia.com> | 2012-03-27 18:31:49 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-04-25 18:31:39 +0800 |
commit | 0795725e8bdaf6818d19e0df3acf7e4080981653 (patch) | |
tree | e0cc613dd7bb55c0ca80472c739a9a973525d552 /src | |
parent | 9fabb96b37df0906571fb6daf745b9025255d165 (diff) | |
download | gsoc2013-epiphany-0795725e8bdaf6818d19e0df3acf7e4080981653.tar gsoc2013-epiphany-0795725e8bdaf6818d19e0df3acf7e4080981653.tar.gz gsoc2013-epiphany-0795725e8bdaf6818d19e0df3acf7e4080981653.tar.bz2 gsoc2013-epiphany-0795725e8bdaf6818d19e0df3acf7e4080981653.tar.lz gsoc2013-epiphany-0795725e8bdaf6818d19e0df3acf7e4080981653.tar.xz gsoc2013-epiphany-0795725e8bdaf6818d19e0df3acf7e4080981653.tar.zst gsoc2013-epiphany-0795725e8bdaf6818d19e0df3acf7e4080981653.zip |
ephy-toolbar: fix stop/reload button alignment
Add location entry and stop/reload button to a vertical GtkSizeGroup.
This ensures that they have the same height, regardless of things like
fonts.
https://bugzilla.gnome.org/show_bug.cgi?id=668135
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-toolbar.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c index 6e10753ea..97a72a13d 100644 --- a/src/ephy-toolbar.c +++ b/src/ephy-toolbar.c @@ -85,11 +85,16 @@ ephy_toolbar_constructed (GObject *object) GtkAction *action; GtkToolItem *back_forward, *location_stop_reload, *tool_item; GtkWidget *tool_button, *box, *location, *toolbar; + GtkSizeGroup *size; G_OBJECT_CLASS (ephy_toolbar_parent_class)->constructed (object); toolbar = GTK_WIDGET (object); + /* Create a GtkSizeGroup to sync the height of the location entry, and + * the stop/reload button. */ + size = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL); + /* Set the MENUBAR style class so it's possible to drag the app * using the toolbar. */ gtk_style_context_add_class (gtk_widget_get_style_context (toolbar), @@ -160,6 +165,11 @@ ephy_toolbar_constructed (GObject *object) NULL); gtk_container_add (GTK_CONTAINER (toolbar), GTK_WIDGET (location_stop_reload)); + + gtk_size_group_add_widget (size, tool_button); + gtk_size_group_add_widget (size, location); + g_object_unref (size); + gtk_widget_set_margin_right (GTK_WIDGET (location_stop_reload), 12); gtk_widget_show_all (GTK_WIDGET (location_stop_reload)); |