Disable LdDiagramView scrollbars when not needed.

This commit is contained in:
Přemysl Eric Janouch 2011-02-20 12:54:15 +01:00
parent f9827e2ff3
commit 403a9d702a
2 changed files with 2 additions and 3 deletions

View File

@ -675,9 +675,6 @@ on_size_allocate (GtkWidget *widget, GtkAllocation *allocation,
/* FIXME: If the new allocation is bigger, we may see more than /* FIXME: If the new allocation is bigger, we may see more than
* what we're supposed to be able to see -> adjust X and Y. * what we're supposed to be able to see -> adjust X and Y.
*
* If the visible area is so large that we simply must see more,
* let's disable the scrollbars in question.
*/ */
update_adjustments (self); update_adjustments (self);
} }

View File

@ -251,6 +251,8 @@ ld_window_main_init (LdWindowMain *self)
priv->view = LD_DIAGRAM_VIEW (ld_diagram_view_new ()); priv->view = LD_DIAGRAM_VIEW (ld_diagram_view_new ());
priv->scrolled_window = gtk_scrolled_window_new (NULL, NULL); priv->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (priv->scrolled_window), gtk_container_add (GTK_CONTAINER (priv->scrolled_window),
GTK_WIDGET (priv->view)); GTK_WIDGET (priv->view));