From: Jim Evins Date: Wed, 3 Dec 2003 03:31:12 +0000 (+0000) Subject: Adjust canvas scroll region if when label size is changed. X-Git-Tag: glabels-2_3_0~526 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b9771d1ad8a9cf97ef7100adfed558098d53cb49;p=glabels 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 --- 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));