[Monodevelop-patches-list] r467 - trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Jan 11 22:14:30 EST 2004
Author: benm
Date: 2004-01-11 22:14:30 -0500 (Sun, 11 Jan 2004)
New Revision: 467
Modified:
trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/FoldMargin.cs
Log:
dont allocate yer GC inside a loop
Modified: trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/FoldMargin.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/FoldMargin.cs 2004-01-12 02:59:38 UTC (rev 466)
+++ trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/FoldMargin.cs 2004-01-12 03:14:30 UTC (rev 467)
@@ -50,9 +50,9 @@
HighlightColor lineNumberPainterColor = textArea.Document.HighlightingStrategy.GetColorFor("LineNumbers");
HighlightColor foldLineColor = textArea.Document.HighlightingStrategy.GetColorFor("FoldLine");
-
+ using (Gdk.GC gc = new Gdk.GC(wnd)) {
for (int y = 0; y < (DrawingPosition.Height + textArea.TextView.VisibleLineDrawingRemainder) / textArea.TextView.FontHeight + 1; ++y) {
- using (Gdk.GC gc = new Gdk.GC(wnd)) {
+
gc.RgbFgColor = TextArea.Style.White;
System.Drawing.Rectangle markerRectangle = new System.Drawing.Rectangle(DrawingPosition.X, DrawingPosition.Top + y * textArea.TextView.FontHeight - textArea.TextView.VisibleLineDrawingRemainder, DrawingPosition.Width, textArea.TextView.FontHeight);
@@ -71,8 +71,9 @@
int currentLine = textArea.TextView.FirstVisibleLine + y;
PaintFoldMarker(wnd, currentLine, markerRectangle);
- }
+
} //Using
+ }
}
}
More information about the Monodevelop-patches-list
mailing list