[Monodevelop-patches-list] r496 - trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/CompletionWindow
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Jan 16 01:55:16 EST 2004
Author: tberman
Date: 2004-01-16 01:55:16 -0500 (Fri, 16 Jan 2004)
New Revision: 496
Modified:
trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/CompletionWindow/CompletionWindow.cs
trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/CompletionWindow/DeclarationViewWindow.cs
Log:
better looking tooltip and some beta *beta* placement code
but it does beat 0,0 as a placement :)
Modified: trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/CompletionWindow/CompletionWindow.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/CompletionWindow/CompletionWindow.cs 2004-01-16 05:30:55 UTC (rev 495)
+++ trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/CompletionWindow/CompletionWindow.cs 2004-01-16 06:55:16 UTC (rev 496)
@@ -290,9 +290,21 @@
if (listView.Selection.GetSelected (out model, out iter)){
ICompletionData data = (ICompletionData) store.GetValue (iter, 2);
- Console.WriteLine (data.Description);
+
+ //FIXME: This code is buggy, and generates a bad placement sometimes when you jump a lot. but it is better than 0,0
+
+ Gtk.TreePath path = store.GetPath (iter);
+ Gdk.Rectangle rect;
+ listView.GetCellArea (path, (Gtk.TreeViewColumn)listView.Columns[0], out rect);
+ int listpos_x, listpos_y;
+ listView.GdkWindow.GetOrigin (out listpos_x, out listpos_y);
+ int vert = listpos_y + rect.y;
+
+ //FIXME: This is a bad calc, its always on the right, it needs to test if thats too big, and if so, place on the left;
+ int horiz = listpos_x + listView.GdkWindow.Size.Width + 30;
declarationviewwindow.Description = data.Description;
declarationviewwindow.ShowAll ();
+ declarationviewwindow.Move (horiz, vert);
}
}
}
Modified: trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/CompletionWindow/DeclarationViewWindow.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/CompletionWindow/DeclarationViewWindow.cs 2004-01-16 05:30:55 UTC (rev 495)
+++ trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/CompletionWindow/DeclarationViewWindow.cs 2004-01-16 06:55:16 UTC (rev 496)
@@ -38,9 +38,9 @@
public DeclarationViewWindow () : base (WindowType.Popup)
{
- BorderWidth = 4;
-
- Add (label = new Label (description));
+ Gtk.Frame frame = new Gtk.Frame ();
+ frame.Add (label = new Label (description));
+ Add (frame);
}
}
}
More information about the Monodevelop-patches-list
mailing list