[mistelix] Add ScrollWindow to RecentFile widgets to allow scrollowing the control when does not fit in the giv



commit 88781c3582a14eca9a69c93f5044195b2d55c848
Author: Jordi Mas <jmas softcatala org>
Date:   Wed Jul 29 12:50:25 2009 +0200

    Add ScrollWindow to RecentFile widgets to allow scrollowing the control when does not fit in the given space

 src/Widgets/WelcomeView.cs |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)
---
diff --git a/src/Widgets/WelcomeView.cs b/src/Widgets/WelcomeView.cs
index 0a5a845..18c043a 100644
--- a/src/Widgets/WelcomeView.cs
+++ b/src/Widgets/WelcomeView.cs
@@ -373,18 +373,29 @@ namespace Mistelix.Widgets
 			w23.Fill = false;
 
 			// Recent projects Treeview
-			recent_treeview = new RecentProjectsTreeView (this);
-			dvd_vbox.Add (recent_treeview);
-
-			Gtk.Box.BoxChild w24 = ((Gtk.Box.BoxChild)(dvd_vbox[recent_treeview]));
-			w24.Position = 1;
-			w24.Expand = false;
+			Gtk.ScrolledWindow scrolled_win = new Gtk.ScrolledWindow ();
 
-			Add(dvd_vbox);
-			Gtk.Box.BoxChild w25 = (Gtk.Box.BoxChild) this[dvd_vbox];
-			w25.Position = 1;
-			w25.Expand = false;
-			w25.Fill = false;
+			Gtk.VBox tree_vbox = new Gtk.VBox ();
+			recent_treeview = new RecentProjectsTreeView (this);
+			tree_vbox.Add (recent_treeview);
+			scrolled_win.AddWithViewport (tree_vbox);
+			dvd_vbox.Add (scrolled_win);
+			Add (dvd_vbox);
+
+			Gtk.Box.BoxChild treeview_child = ((Gtk.Box.BoxChild)(tree_vbox [recent_treeview]));
+			treeview_child.Position = 1;
+			treeview_child.Expand = false;
+			treeview_child.Fill = false;
+
+			Gtk.Box.BoxChild scrolled_child = ((Gtk.Box.BoxChild)(dvd_vbox [scrolled_win]));
+			scrolled_child.Position = 1;
+			scrolled_child.Expand = true;
+			scrolled_child.Fill = true;
+
+			Gtk.Box.BoxChild dvd_vbox_child = (Gtk.Box.BoxChild) this [dvd_vbox];
+			dvd_vbox_child.Position = 1;
+			dvd_vbox_child.Expand = false;
+			dvd_vbox_child.Fill = true;
 			box.Add(this);
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]