]> git.sur5r.net Git - glabels/commitdiff
Adjust canvas scroll region if when label size is changed.
authorJim Evins <evins@snaught.com>
Wed, 3 Dec 2003 03:31:12 +0000 (03:31 +0000)
committerJim Evins <evins@snaught.com>
Wed, 3 Dec 2003 03:31:12 +0000 (03:31 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@368 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/view.c

index 7c0adde99ed9c625bc788ac7231cda89bc8b0168..c703a648d5b0094d56c0f0212fc8b17d3a822597 100644 (file)
@@ -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));