]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Improve the layout of the text entries in gtk3. For gtk2 this could also be useful
authorNathan Samson <nathansamson@gmail.com>
Sun, 4 Sep 2011 00:37:22 +0000 (02:37 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 4 Sep 2011 03:45:31 +0000 (20:45 -0700)
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
info.c

diff --git a/info.c b/info.c
index 75936f4fef3abf2eb61381e615aa5d3f0e9d8683..55708bedfd7b103313810034398749d2364659d9 100644 (file)
--- a/info.c
+++ b/info.c
@@ -151,10 +151,16 @@ static GtkTextBuffer *text_entry(GtkWidget *box, const char *label, gboolean exp
 
        gtk_box_pack_start(GTK_BOX(box), frame, expand, expand, 0);
 
+       GtkWidget* scrolled_window = gtk_scrolled_window_new (0, 0);
+       gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), GTK_SHADOW_IN);
+       gtk_widget_show(scrolled_window);
+
        view = gtk_text_view_new ();
+       gtk_container_add(GTK_CONTAINER(scrolled_window), view);
+
        buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
 
-       gtk_container_add(GTK_CONTAINER(frame), view);
+       gtk_container_add(GTK_CONTAINER(frame), scrolled_window);
        return buffer;
 }