[Monodevelop-patches-list] r2168 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Wed Jan 26 16:37:16 EST 2005


Author: alexmipe
Date: 2005-01-26 16:37:16 -0500 (Wed, 26 Jan 2005)
New Revision: 2168

Modified:
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs
Log:
Closes bug #71822.

Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2005-01-26 21:02:31 UTC (rev 2167)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2005-01-26 21:37:16 UTC (rev 2168)
@@ -1,5 +1,10 @@
 2005-01-26  Alexandre Gomes  <alexmipego at gmail.com>
 
+	* CodeCompletion/CompletationListWindow.cs: Fixed completion
+	window when near screen edges.
+
+2005-01-26  Alexandre Gomes  <alexmipego at gmail.com>
+
 	* CodeCompletion/CompletationListWindow.cs:
 	* CodeCompletion/ListWindow.cs: Closes bug #71686. Also makes
 	list sorted case-isensitive.

Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs	2005-01-26 21:02:31 UTC (rev 2167)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs	2005-01-26 21:37:16 UTC (rev 2168)
@@ -85,7 +85,20 @@
 			int tx, ty;
 			control.GdkWindow.GetOrigin (out tx, out ty);
 			
-			Move (tx + wx, ty + wy);
+			int x = tx + wx;
+			int y = ty + wy;
+			
+			int w, h;
+			GetSize (out w, out h);
+			
+			if ((x + w) > Screen.Width)
+				x = Screen.Width - w;
+			
+			if ((y + h) > Screen.Height)
+				y = y - rect.Height - h;
+							
+			Move (x, y);
+			
 			Show ();
 		}
 		




More information about the Monodevelop-patches-list mailing list