From 4119fbaa29d8ed6abd9daddf1a7d2b70916441b3 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 18 Aug 2022 02:06:30 +0300 Subject: [PATCH 32/32] gtk4: Set up science dialog scrolling See osdn #45379 Signed-off-by: Marko Lindqvist --- client/gui-gtk-4.0/repodlgs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/gui-gtk-4.0/repodlgs.c b/client/gui-gtk-4.0/repodlgs.c index 9b0693c0bc..6ca1f7ce9d 100644 --- a/client/gui-gtk-4.0/repodlgs.c +++ b/client/gui-gtk-4.0/repodlgs.c @@ -262,6 +262,9 @@ static void science_diagram_update(GtkDrawingArea *widget, cairo_t *cr, return; } + get_reqtree_dimensions(reqtree, &rtwidth, &rtheight); + gtk_widget_set_size_request(GTK_WIDGET(widget), rtwidth, rtheight); + sw = GTK_SCROLLED_WINDOW(gtk_widget_get_parent(GTK_WIDGET(widget))); hadjustment = gtk_scrollable_get_hadjustment(GTK_SCROLLABLE(sw)); vadjustment = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(sw)); @@ -273,7 +276,6 @@ static void science_diagram_update(GtkDrawingArea *widget, cairo_t *cr, canvas.drawable = cr; - get_reqtree_dimensions(reqtree, &rtwidth, &rtheight); draw_reqtree(reqtree, &canvas, 0, 0, 0, 0, rtwidth, rtheight); } -- 2.35.1