summaryrefslogtreecommitdiffstats
path: root/src/tab-chrome.c
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-19 03:00:57 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-19 03:00:57 (EDT)
commitf3aac7db49a67f3357932e1770d33aa744c73de7 (patch)
treef5876f3592ac4d7eab25cdd722558acdb284750f /src/tab-chrome.c
parentededf613455c61e0b7bbd15a7183173e2c6b6076 (diff)
downloadmarquee-f3aac7db49a67f3357932e1770d33aa744c73de7.zip
marquee-f3aac7db49a67f3357932e1770d33aa744c73de7.tar.gz
marquee-f3aac7db49a67f3357932e1770d33aa744c73de7.tar.bz2
src/tab-chrome.c: Adjust history popover to size of visible child
Diffstat (limited to 'src/tab-chrome.c')
-rw-r--r--src/tab-chrome.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 6b373e7..1d4b2e6 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -44,10 +44,15 @@ static void
back_forward_toggle_button_toggled(GtkToggleButton *toggle_button,
GtkStack *stack)
{
- gtk_stack_set_visible_child(stack, gtk_stack_get_child_by_name(
- stack,
+ /* Use gtk_widget_show() and gtk_widget_hide() instead of
+ * gtk_stack_set_visible_child() so that the stack fits the size of only
+ * the visible child. */
+ gtk_widget_show(gtk_stack_get_child_by_name(stack,
gtk_toggle_button_get_active(toggle_button) ?
"text" : "list"));
+ gtk_widget_hide(gtk_stack_get_child_by_name(stack,
+ gtk_toggle_button_get_active(toggle_button) ?
+ "list" : "text"));
}
static GtkWidget *
@@ -212,6 +217,7 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event,
/* NB: gtk_popover_popup() is new in GTK+ 3.22. */
gtk_widget_show_all(chrome->back_forward_popover);
+ gtk_widget_hide(text_view);
return FALSE;
}