|
|
@ -68,11 +68,13 @@ namespace ICSharpCode.TextEditor |
|
|
|
g.FillRectangle(BrushRegistry.GetBrush(textArea.Enabled ? lineNumberPainterColor.BackgroundColor : SystemColors.InactiveBorder), markerRectangle); |
|
|
|
g.FillRectangle(BrushRegistry.GetBrush(textArea.Enabled ? lineNumberPainterColor.BackgroundColor : SystemColors.InactiveBorder), markerRectangle); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int currentLine = textArea.Document.GetFirstLogicalLine(textArea.Document.GetVisibleLine(textArea.TextView.FirstVisibleLine) + y); |
|
|
|
int currentLine = textArea.Document.GetFirstLogicalLine(textArea.TextView.FirstPhysicalLine + y); |
|
|
|
|
|
|
|
if (currentLine < textArea.Document.TotalNumberOfLines) { |
|
|
|
PaintFoldMarker(g, currentLine, markerRectangle); |
|
|
|
PaintFoldMarker(g, currentLine, markerRectangle); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool SelectedFoldingFrom(List<FoldMarker> list) |
|
|
|
bool SelectedFoldingFrom(List<FoldMarker> list) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -155,19 +157,22 @@ namespace ICSharpCode.TextEditor |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (isFoldEnd) { |
|
|
|
if (isFoldEnd) { |
|
|
|
int midy = drawingRectangle.Top + drawingRectangle.Height / 2; |
|
|
|
int midy = drawingRectangle.Top + drawingRectangle.Height / 2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// draw fold end marker
|
|
|
|
|
|
|
|
g.DrawLine(BrushRegistry.GetPen(isEndSelected ? selectedFoldLine.Color : foldLineColor.Color), |
|
|
|
|
|
|
|
xPos, |
|
|
|
|
|
|
|
midy, |
|
|
|
|
|
|
|
xPos + foldMarkerSize / 2, |
|
|
|
|
|
|
|
midy); |
|
|
|
|
|
|
|
|
|
|
|
// draw line above fold end marker
|
|
|
|
// draw line above fold end marker
|
|
|
|
|
|
|
|
// must be drawn after fold marker because it might have a different color than the fold marker
|
|
|
|
g.DrawLine(BrushRegistry.GetPen(isBetweenSelected || isEndSelected ? selectedFoldLine.Color : foldLineColor.Color), |
|
|
|
g.DrawLine(BrushRegistry.GetPen(isBetweenSelected || isEndSelected ? selectedFoldLine.Color : foldLineColor.Color), |
|
|
|
xPos, |
|
|
|
xPos, |
|
|
|
drawingRectangle.Top, |
|
|
|
drawingRectangle.Top, |
|
|
|
xPos, |
|
|
|
xPos, |
|
|
|
midy); |
|
|
|
midy); |
|
|
|
|
|
|
|
|
|
|
|
// draw fold end marker
|
|
|
|
|
|
|
|
g.DrawLine(BrushRegistry.GetPen(isBetweenSelected || isEndSelected ? selectedFoldLine.Color : foldLineColor.Color), |
|
|
|
|
|
|
|
xPos, |
|
|
|
|
|
|
|
midy, |
|
|
|
|
|
|
|
xPos + foldMarkerSize / 2, |
|
|
|
|
|
|
|
midy); |
|
|
|
|
|
|
|
// draw line below fold end marker
|
|
|
|
// draw line below fold end marker
|
|
|
|
if (isBetween) { |
|
|
|
if (isBetween) { |
|
|
|
g.DrawLine(BrushRegistry.GetPen(isBetweenSelected ? selectedFoldLine.Color : foldLineColor.Color), |
|
|
|
g.DrawLine(BrushRegistry.GetPen(isBetweenSelected ? selectedFoldLine.Color : foldLineColor.Color), |
|
|
|