From 614ca752f39c5a244b5b804161ece5518c422622 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 22 Feb 2020 21:41:17 +0000 Subject: [PATCH] GTK: When we update the dimensions, resize the grid By doing this, we ensure the scrollbars update their thumbs properly, otherwise they can lag behind the page shape somewhat. Signed-off-by: Daniel Silverstone --- frontends/gtk/window.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c index 3c2e2f495..df1e58de6 100644 --- a/frontends/gtk/window.c +++ b/frontends/gtk/window.c @@ -115,6 +115,9 @@ struct gui_window { /** display widget for this page or frame */ GtkLayout *layout; + /** The container for the layout etc */ + GtkWidget *grid; + /** handle to the the visible tab */ GtkWidget *tab; @@ -856,6 +859,7 @@ gui_window_create(struct browser_window *bw, /* Construct our primary elements */ g->container = GTK_WIDGET(gtk_builder_get_object(tab_builder, "tabBox")); g->layout = GTK_LAYOUT(gtk_builder_get_object(tab_builder, "layout")); + g->grid = GTK_WIDGET(gtk_builder_get_object(tab_builder, "tabContents")); g->status_bar = GTK_LABEL(gtk_builder_get_object(tab_builder, "status_bar")); g->paned = GTK_PANED(gtk_builder_get_object(tab_builder, "hpaned1")); g->input_method = gtk_im_multicontext_new(); @@ -1186,6 +1190,7 @@ static void gui_window_update_extent(struct gui_window *g) if (browser_window_get_extents(g->bw, true, &w, &h) == NSERROR_OK) { gtk_layout_set_size(g->layout, w, h); + gtk_widget_queue_resize(g->grid); } }