From b9771d1ad8a9cf97ef7100adfed558098d53cb49 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Wed, 3 Dec 2003 03:31:12 +0000 Subject: [PATCH] Adjust canvas scroll region if when label size is changed. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@368 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/view.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glabels2/src/view.c b/glabels2/src/view.c index 7c0adde9..c703a648 100644 --- a/glabels2/src/view.c +++ b/glabels2/src/view.c @@ -565,9 +565,15 @@ static void label_resized_cb (glLabel *label, glView *view) { + gdouble label_width, label_height; + g_return_if_fail (label && GL_IS_LABEL (label)); g_return_if_fail (view && GL_IS_VIEW (view)); + gl_label_get_size (label, &label_width, &label_height); + gnome_canvas_set_scroll_region (GNOME_CANVAS (view->canvas), + 0.0, 0.0, label_width, label_height); + gtk_object_destroy (GTK_OBJECT (view->bg_group)); gtk_object_destroy (GTK_OBJECT (view->grid_group)); gtk_object_destroy (GTK_OBJECT (view->markup_group)); -- 2.39.5