[Monodevelop-patches-list] r652 - trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Jan 25 13:04:47 EST 2004


Author: benm
Date: 2004-01-25 13:04:47 -0500 (Sun, 25 Jan 2004)
New Revision: 652

Modified:
   trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/FoldMargin.cs
   trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/GutterMargin.cs
Log:
move the seperator line to the gutter margin, where it should be

Modified: trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/FoldMargin.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/FoldMargin.cs	2004-01-25 17:32:50 UTC (rev 651)
+++ trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/FoldMargin.cs	2004-01-25 18:04:47 UTC (rev 652)
@@ -57,21 +57,10 @@
 				System.Drawing.Rectangle markerRectangle = new System.Drawing.Rectangle(DrawingPosition.X, DrawingPosition.Top + y * textArea.TextView.FontHeight - textArea.TextView.VisibleLineDrawingRemainder, DrawingPosition.Width, textArea.TextView.FontHeight);
 				
 				if (rect.IntersectsWith(markerRectangle)) {
-					// draw dotted separator line
-					if (textArea.Document.TextEditorProperties.ShowLineNumbers) {
-						wnd.DrawRectangle (gc, true, new System.Drawing.Rectangle (markerRectangle.X + 1, markerRectangle.Y, markerRectangle.Width - 1, markerRectangle.Height));
+					wnd.DrawRectangle (gc, true, new System.Drawing.Rectangle (markerRectangle.X + 1, markerRectangle.Y, markerRectangle.Width - 1, markerRectangle.Height));
 					
-						gc.RgbFgColor = text_fg;
-						gc.RgbBgColor = text_bg;
-						gc.SetLineAttributes (1, LineStyle.OnOffDash, CapStyle.NotLast, JoinStyle.Miter);
-						wnd.DrawLine (gc, base.drawingPosition.X, markerRectangle.Y, base.drawingPosition.X, markerRectangle.Bottom);
-					} else {
-						wnd.DrawRectangle (gc, true, new System.Drawing.Rectangle (markerRectangle.X + 1, markerRectangle.Y, markerRectangle.Width - 1, markerRectangle.Height));
-					}
-					
 					int currentLine = textArea.TextView.FirstVisibleLine + y;
 					PaintFoldMarker(wnd, currentLine, markerRectangle);
-				
 				} //Using
 			}
 			}

Modified: trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/GutterMargin.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/GutterMargin.cs	2004-01-25 17:32:50 UTC (rev 651)
+++ trunk/MonoDevelop/src/Libraries/ICSharpCode.TextEditor/src/Gui/GutterMargin.cs	2004-01-25 18:04:47 UTC (rev 652)
@@ -65,29 +65,28 @@
 				ly.FontDescription = FontContainer.DefaultFont;
 				
 				HighlightColor lineNumberPainterColor = textArea.Document.HighlightingStrategy.GetColorFor("LineNumbers");
-				Gdk.Color bg = new Gdk.Color (lineNumberPainterColor.BackgroundColor);
-				Gdk.Color fg_text = new Gdk.Color (lineNumberPainterColor.Color);
-				Gdk.Color fg_rect = TextArea.Style.White;
 				
+				gc.RgbBgColor = new Gdk.Color (lineNumberPainterColor.BackgroundColor);
+				gc.RgbFgColor = TextArea.Style.White;
+				wnd.DrawRectangle (gc, true, drawingPosition);
 				
+				gc.RgbFgColor = new Gdk.Color (lineNumberPainterColor.Color);
+				gc.SetLineAttributes (1, LineStyle.OnOffDash, CapStyle.NotLast, JoinStyle.Miter);
+				wnd.DrawLine (gc, drawingPosition.X + drawingPosition.Width, drawingPosition.Y, drawingPosition.X + drawingPosition.Width, drawingPosition.Height);
+					
+				
 				//FIXME: This doesnt allow different fonts and what not
 				int fontHeight = TextArea.TextView.FontHeight;
 		
 				for (int y = 0; y < (DrawingPosition.Height + textArea.TextView.VisibleLineDrawingRemainder) / fontHeight + 1; ++y) {
 					int ypos = drawingPosition.Y + fontHeight * y  - textArea.TextView.VisibleLineDrawingRemainder;
-					System.Drawing.Rectangle backgroundRectangle = new System.Drawing.Rectangle(drawingPosition.X, ypos, drawingPosition.Width, fontHeight);
-					//if (rect.IntersectsWith(backgroundRectangle)) {
-						
-						gc.RgbBgColor = bg;
-						gc.RgbFgColor = fg_rect;
-						wnd.DrawRectangle (gc, true, backgroundRectangle);
-						int curLine = y + textArea.TextView.FirstVisibleLine;
-						if (curLine < textArea.Document.TotalNumberOfLines) {
-							gc.RgbFgColor = fg_text;
-							ly.SetText ((curLine + 1).ToString ());
-							wnd.DrawLayout (gc, drawingPosition.X, ypos, ly);
-						}
-					//}
+				
+
+					int curLine = y + textArea.TextView.FirstVisibleLine;
+					if (curLine < textArea.Document.TotalNumberOfLines) {
+						ly.SetText ((curLine + 1).ToString ());
+						wnd.DrawLayout (gc, drawingPosition.X, ypos, ly);
+					}
 				}
 			}}
 		}




More information about the Monodevelop-patches-list mailing list