diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-16 19:15:40 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-16 19:15:40 (EDT) |
commit | a367c8f131eabdb0832e2d3b2cb8e5f09fc74113 (patch) | |
tree | ecd60767dc0190961078af369225ea61ace396db /src | |
parent | 9cce6e8f8d3d2c0e7019a31e400bd8b2e54b0e00 (diff) | |
download | marquee-a367c8f131eabdb0832e2d3b2cb8e5f09fc74113.zip marquee-a367c8f131eabdb0832e2d3b2cb8e5f09fc74113.tar.gz marquee-a367c8f131eabdb0832e2d3b2cb8e5f09fc74113.tar.bz2 |
mq_tab_chrome_new(): Wrap navigation toolbar in a grid container
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-chrome.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index f4954f0..25e6f40 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -29,17 +29,20 @@ MqTabChrome * mq_tab_chrome_new(gchar *uri) { MqTabChrome *chrome; + GtkWidget *navigation_toolbar; GtkToolItem *location_bar_container; chrome = malloc(sizeof(*chrome)); - chrome->container = gtk_toolbar_new(); - gtk_toolbar_insert(GTK_TOOLBAR(chrome->container), + chrome->container = gtk_grid_new(); + + navigation_toolbar = gtk_toolbar_new(); + gtk_toolbar_insert(GTK_TOOLBAR(navigation_toolbar), gtk_tool_button_new( gtk_image_new_from_icon_name("go-previous", 16), "Back"), -1); - gtk_toolbar_insert(GTK_TOOLBAR(chrome->container), + gtk_toolbar_insert(GTK_TOOLBAR(navigation_toolbar), gtk_tool_button_new( gtk_image_new_from_icon_name("go-next", 16), "Forward"), @@ -52,9 +55,12 @@ mq_tab_chrome_new(gchar *uri) gtk_container_add(GTK_CONTAINER(location_bar_container), chrome->location_bar); gtk_tool_item_set_expand(location_bar_container, TRUE); - gtk_toolbar_insert(GTK_TOOLBAR(chrome->container), + gtk_toolbar_insert(GTK_TOOLBAR(navigation_toolbar), location_bar_container, -1); - gtk_widget_set_hexpand(chrome->container, TRUE); + gtk_widget_set_hexpand(navigation_toolbar, TRUE); + + gtk_grid_attach(GTK_GRID(chrome->container), navigation_toolbar, + 0, 0, 1, 1); return chrome; } |