From e70bb20934b5520b04037fd61c83fecc196bf336 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Fri, 7 Jan 2022 03:34:14 +0100 Subject: Improve toolbar hiding --- fiv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fiv.c b/fiv.c index cdebf6a..deb1531 100644 --- a/fiv.c +++ b/fiv.c @@ -1406,12 +1406,16 @@ main(int argc, char *argv[]) G_CALLBACK(on_button_press_view), NULL); gtk_container_add(GTK_CONTAINER(view_scroller), g.view); + // We need to hide it together with the separator. + g.view_toolbar = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + gtk_box_pack_start(GTK_BOX(g.view_toolbar), + make_view_toolbar(), FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(g.view_toolbar), + gtk_separator_new(GTK_ORIENTATION_VERTICAL), FALSE, FALSE, 0); + // Need to put the toolbar at the top, because of the horizontal scrollbar. g.view_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - g.view_toolbar = make_view_toolbar(); gtk_box_pack_start(GTK_BOX(g.view_box), g.view_toolbar, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(g.view_box), - gtk_separator_new(GTK_ORIENTATION_VERTICAL), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(g.view_box), view_scroller, TRUE, TRUE, 0); g.browser_scroller = gtk_scrolled_window_new(NULL, NULL); -- cgit v1.2.3-70-g09d2