[Monodevelop-patches-list] r2035 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue Nov 23 20:14:38 EST 2004
Author: alp
Date: 2004-11-23 20:14:38 -0500 (Tue, 23 Nov 2004)
New Revision: 2035
Modified:
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs
Log:
* CodeCompletion/ListWindow.cs:
Make list rendering more like Gtk+ and don't override user's font size
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2004-11-23 23:54:38 UTC (rev 2034)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2004-11-24 01:14:38 UTC (rev 2035)
@@ -6,6 +6,8 @@
Fix wrapping of completion documentation.
Remove redundant overload count.
Add arrow UI hint for selecting an overloaded method.
+ * CodeCompletion/ListWindow.cs:
+ Make list rendering more like Gtk+ and don't override user's font size
2004-11-23 Alp Toker <alp at atoker.com>
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs 2004-11-23 23:54:38 UTC (rev 2034)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs 2004-11-24 01:14:38 UTC (rev 2035)
@@ -201,9 +201,8 @@
public class ListWidget: Gtk.DrawingArea
{
- int margin = 2;
- int leftPadding = 2;
- int lineSep = 2;
+ int margin = 0;
+ int padding = 4;
int listWidth = 300;
Pango.Layout layout;
@@ -336,7 +335,7 @@
int lineWidth = winWidth - margin*2;
int count = win.DataProvider.ItemCount;
- int xpos = margin + leftPadding;
+ int xpos = margin + padding;
int n = 0;
while (ypos < winHeight - margin && (page + n) < win.DataProvider.ItemCount)
@@ -351,11 +350,11 @@
if (page + n == selection) {
if (!disableSelection) {
- this.GdkWindow.DrawRectangle (this.Style.BaseGC (StateType.Selected), true, margin, ypos, lineWidth, he);
+ this.GdkWindow.DrawRectangle (this.Style.BaseGC (StateType.Selected), true, margin, ypos, lineWidth, he + padding);
this.GdkWindow.DrawLayout (this.Style.TextGC (StateType.Selected), xpos + icon.Width + 2, typos, layout);
}
else {
- this.GdkWindow.DrawRectangle (this.Style.BaseGC (StateType.Selected), false, margin, ypos, lineWidth, he);
+ this.GdkWindow.DrawRectangle (this.Style.BaseGC (StateType.Selected), false, margin, ypos, lineWidth, he + padding);
this.GdkWindow.DrawLayout (this.Style.TextGC (StateType.Normal), xpos + icon.Width + 2, typos, layout);
}
}
@@ -399,10 +398,10 @@
this.GdkWindow.GetSize (out lvWidth, out lvHeight);
layout.GetPixelSize (out rowWidth, out rowHeight);
- rowHeight += lineSep;
- visibleRows = (winHeight + lineSep - margin * 2) / rowHeight;
+ rowHeight += padding;
+ visibleRows = (winHeight + padding - margin * 2) / rowHeight;
- int newHeight = (rowHeight * visibleRows) + margin * 2 - lineSep;
+ int newHeight = (rowHeight * visibleRows) + margin * 2;
if (lvWidth != listWidth || lvHeight != newHeight)
this.SetSizeRequest (listWidth, newHeight);
@@ -421,7 +420,6 @@
layout.Wrap = Pango.WrapMode.Char;
FontDescription des = this.Style.FontDescription.Copy();
- des.Size = win.Style.FontDescription.Size;
layout.FontDescription = des;
CalcVisibleRows ();
}
More information about the Monodevelop-patches-list
mailing list