@ -116,8 +116,8 @@ namespace ICSharpCode.AvalonEdit.Folding
@@ -116,8 +116,8 @@ namespace ICSharpCode.AvalonEdit.Folding
foreach ( FoldingMarginMarker m in markers ) {
int visualColumn = m . VisualLine . GetVisualColumn ( m . FoldingSection . StartOffset - m . VisualLine . FirstDocumentLine . Offset ) ;
TextLine textLine = m . VisualLine . GetTextLine ( visualColumn ) ;
double yPos = m . VisualLine . GetTextLineVisualYPosition ( textLine , VisualYPosition . LineTop ) - TextView . VerticalOffset ;
yPos + = ( textLine . Height - m . DesiredSize . Height ) / 2 ;
double yPos = m . VisualLine . GetTextLineVisualYPosition ( textLine , VisualYPosition . TextMiddle ) - TextView . VerticalOffset ;
yPos - = m . DesiredSize . Height / 2 ;
double xPos = ( finalSize . Width - m . DesiredSize . Width ) / 2 ;
m . Arrange ( new Rect ( PixelSnapHelpers . Round ( new Point ( xPos , yPos ) , pixelSize ) , m . DesiredSize ) ) ;
}
@ -310,7 +310,7 @@ namespace ICSharpCode.AvalonEdit.Folding
@@ -310,7 +310,7 @@ namespace ICSharpCode.AvalonEdit.Folding
double GetVisualPos ( VisualLine vl , TextLine tl , double pixelHeight )
{
double pos = vl . GetTextLineVisualYPosition ( tl , VisualYPosition . LineTop ) + tl . Height / 2 - TextView . VerticalOffset ;
double pos = vl . GetTextLineVisualYPosition ( tl , VisualYPosition . TextMiddle ) - TextView . VerticalOffset ;
return PixelSnapHelpers . PixelAlign ( pos , pixelHeight ) ;
}