diff options
-rw-r--r-- | src/tab-chrome.c | 10 |
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; } |