summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-02-20 12:54:15 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-02-20 12:54:15 +0100
commit403a9d702a1f382808e0937dfb149f99fd9bb217 (patch)
treefb8f248608dbed897bbc9baaf5eb2517df99b902
parentf9827e2ff3d2002b6facd00a8c74f8a8861636c7 (diff)
downloadlogdiag-403a9d702a1f382808e0937dfb149f99fd9bb217.tar.gz
logdiag-403a9d702a1f382808e0937dfb149f99fd9bb217.tar.xz
logdiag-403a9d702a1f382808e0937dfb149f99fd9bb217.zip
Disable LdDiagramView scrollbars when not needed.
-rw-r--r--liblogdiag/ld-diagram-view.c3
-rw-r--r--src/ld-window-main.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/liblogdiag/ld-diagram-view.c b/liblogdiag/ld-diagram-view.c
index df86328..81cd76b 100644
--- a/liblogdiag/ld-diagram-view.c
+++ b/liblogdiag/ld-diagram-view.c
@@ -675,9 +675,6 @@ on_size_allocate (GtkWidget *widget, GtkAllocation *allocation,
/* 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.
- *
- * If the visible area is so large that we simply must see more,
- * let's disable the scrollbars in question.
*/
update_adjustments (self);
}
diff --git a/src/ld-window-main.c b/src/ld-window-main.c
index 1c1f7fe..1daf667 100644
--- a/src/ld-window-main.c
+++ b/src/ld-window-main.c
@@ -251,6 +251,8 @@ ld_window_main_init (LdWindowMain *self)
priv->view = LD_DIAGRAM_VIEW (ld_diagram_view_new ());
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_WIDGET (priv->view));