Skip to content

Commit

Permalink
! Code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
wmjordan committed Mar 21, 2019
1 parent 7c73b68 commit f8bbc1d
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Codist/Margins/SelectionMargin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ sealed class SelectionMargin : FrameworkElement, IDisposable, IWpfTextViewMargin
{
public const string MarginName = nameof(SelectionMargin);
const string FormatName = "Selected Text";
const double SelectionRenderPadding = -3;
const double MarginOpacity = 0.3;
readonly IWpfTextView _TextView;
readonly IEditorFormatMap _EditorFormatMap;
readonly IVerticalScrollBar _ScrollBar;

Brush _SelectionBrush;
double _ScrollbarWidth;

public SelectionMargin(IWpfTextView textView, IVerticalScrollBar scrollBar) {
_TextView = textView;
Expand Down Expand Up @@ -114,13 +112,6 @@ protected override void OnRender(DrawingContext drawingContext) {
}
}

protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo) {
base.OnRenderSizeChanged(sizeInfo);
var b = _ScrollBar as FrameworkElement;
_ScrollbarWidth = b.ActualWidth + SelectionRenderPadding;
InvalidateVisual();
}

void DrawSelections(DrawingContext drawingContext) {
var ss = _TextView.Selection.SelectedSpans;
var threshold = ss.Count < 2 ? 3 : 0.5;
Expand Down

0 comments on commit f8bbc1d

Please sign in to comment.